We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpElectronics,  Serial Library › Seting up the serial comunication
Page Index Toggle Pages: 1
Seting up the serial comunication (Read 2703 times)
Seting up the serial comunication
Mar 31st, 2010, 5:56am
 
Hi!

I'm trying to set up the serial communication with the arduino through processing.

My arduino is already working with the arduino IDE but I haven't managed in the Processing one.
However I didn't really understand what were the steps needed to set it up.

I'm using a Mac Intel so on the instruction page (http://processing.org/reference/libraries/serial/) the instruction aren't very explicit. All I understood was I didn't need to run the .command file

So what I did was:
1 - Setup the arduino
2 - Download processing and run one graphical example
3 - Using Arduino IDE upload to the board the standardFirmata example
4 - Close the Arduino IDE
5 - Open the SimpleWrite example in Processing
6 - Press play

What I got
Code:
Cannot run Java in 32 bit mode. Continuing in 64 bit mode.

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7

gnu.io.PortInUseException: Unknown Application
at ........
Exception in thread "Animation Thread" java.lang.RuntimeException: Error inside Serial.<init>()
at ........


Did I miss anything in seting it up?


Edit: I'm thinking about submit this to bugzilla but I can't login for some reason, if anyone else thinks this is a good idea plase submit it and link it to this post.  Grin
Re: Seting up the serial comunication
Reply #1 - Mar 31st, 2010, 7:57am
 
This is the problem: "Cannot run Java in 32 bit mode. Continuing in 64 bit mode."

What version of Mac OS are you running? It looks like you're on 10.5, and that you've made Java 6 the default version of Java, instead of Java 5. Is that the case?

The serial library only works in 32 bit mode. As long as you're using Processing 1.1, you shouldn't have problems like this.
Re: Seting up the serial comunication
Reply #2 - Mar 31st, 2010, 10:02am
 
I have now changed the default version of Java do 6 and I no longer get the "Cannot run Java in 32 bit mode. Continuing in 64 bit mode." warning.

However this was not the (whole) problem for the serial  Undecided
I still get the PortInUseException.

I have now changed the firmata code since I understand there was some problems with it. But everything is the same  Embarrassed

Anymore ideas?
Re: Seting up the serial comunication
Reply #3 - Apr 1st, 2010, 6:39am
 
I fixed this with the March release.

Dunno what the bug was but it works now  Grin

Oh and also changed the default Firmata with this http://at.or.at/hans/pd/objects.html#pduino
Page Index Toggle Pages: 1