Pages: [1]   Go Down
Author Topic: Processing, Android, and Arduino  (Read 1385 times)
0 Members and 1 Guest are viewing this topic.
Horizon City, TX
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I'm having an issue.

I've successfully ran Processing programs on computer and Android, ran Arduino programs, and controlled Arduino from a Processing PC program.

Now, I'm trying to control the Arduino with my Android, and am having issues.  I am working with Processing 2.0b7, and most of the examples are out of date.

All I want to do is turn LED 13 on and off when the screen is pressed.  If I can get past that "what should not be a hurdle, hurdle" I think I can go from there to what I want to do.

It should be relatively simple, but every example is complicated enough that I'm having trouble stripping out what I need.

Does anyone have something that works that they could share?  Firmatta on the Arduino end is fine, its the Processing end that keeps throwing errors and causing problems.

Thanks in advance.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am working with Processing 2.0b7, and most of the examples are out of date.
Mostly because 2.0b7 doesn't play well with Arduino.

Quote
All I want to do is turn LED 13 on and off when the screen is pressed.
When what screen is pressed?

Quote
It should be relatively simple, but every example is complicated enough that I'm having trouble stripping out what I need.
Pick one, and show us what you are starting from.

Quote
its the Processing end that keeps throwing errors and causing problems.
Well, fix them. Or download 1.5.1, instead. Or tell us what they are. Or all of the above.
Logged

Horizon City, TX
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://stream.tellart.com/controlling-arduino-with-android/

I'm working mostly with the examples in this tutorial.

The error is probably with Processing, it keeps throwing: cannot access com.android.future.usb.UsbAccessory.

I tried Googling this error, but most of the explanations seem to start in the middle of the problem.  I did look at the Java source files from the ArduinoADK offered on the Tellart site, but all references to the cannot access file are commented out - I can't find where it is even trying to access the file to fix it.

As far as what screen, I have a full screen app that changes from black to white when the screen is pressed - I just want to add the Arduino pin 13 doing the same thing when I press the screen.
Logged

Horizon City, TX
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Messing around further with the Tellart examples, I found that if I comment out this line:

//  if ( arduino.list() != null ) arduino.connect( arduino.list()[0] ); //if there is an arduino to connect to, do so

The sketch will compile.  Is there something in on of these functions (the .list() or .connect() that is killing the compile process?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is there something in on of these functions (the .list() or .connect() that is killing the compile process?
You mean "is there something in these functions that makes use of a library that can not be found/was not imported".  The answer is most likely yes.
Logged

Pages: [1]   Go Up
Jump to: