Loading...
Logo
Processing Forum
Processing 1.5.1 won't recognize my Arduino Uno at ttyACM0 but the serial monitor with the Arduino IDE will communicate with the Uno via ttyACM0.

In Processing when I run the following with the Uno connected to my computer, nothing is printed by the Serial.list statement. I am using Ubuntu 11.04.

import processing.serial.*;

// The serial port
Serial myPort;       

// List all the available serial ports
println("ports");
println(Serial.list());

Additionally when I connect my Ardweeny (thru USB/FTDI), Processing will recognize the Ardweeny at ttyUSB0.

Is there a fix or work around for this?

Thanks, Kevin

Replies(4)

Did you ever resolve this? I have the same issue connecting to my Teensy++ (Teensyduino). Nothing from Serial.list() and an error for Serial.list()[0];

I'm hoping you found and can share the magic formula to resolve this. I've been searching and working on this issue for a couple of weeks now to no avail and am at my wits' end.

Thanks in advance for any suggestions you may have.
No I have not resolved this. My understanding is that there is a bug (specific to USB handling - mismatch in Java versions of the library?) in the Linux version of Processing 1.5.1 that causes the problem. I saw a post a few months ago where this was known and was being addressed in the next version of Processing. I believe there is a beta of Processing 2.0 on their web site but I have not tried it to see if the issue has been fixed. 

Processing 1.5.1 will connect thru FTDI and have I done so w/ an Ardweeny and with a Mintduino build.

Kevin


Have you tried the steps listed in Linux section of the following link?


It didn't work for me but maybe for you?

Kevin

Thanks Kevin, I tried that but to no avail.

In the meantime I have found a solution. I installed Ubuntu 11.10 and the downloaded a fresh Processing 1.5.1 and fetched Arduino this time from the Ubuntu Software Center (in Ubuntu 10.04 this method wasn't available). I copied from usr/arduino/lib the Arduino's RXTXcomm.jar, which in the Arduino install is a shortcut, and put it in the processing-1.5.1/modes/java/libraries/serial/library folder (overwriting Processing's version).

Processing now works in that I can address my Arduino (Teensy2++) with "/dev/ttyACM0", though Serial.list() doesn't work still. However, now if I don't disconnect and reconnect the Arduino before I restart the program, I get a "RXTX Warning:  Removing stale lock file" error, which is very annoying.

Also, before I managed to get this working, installing Ubuntu 11.10, I did manage to get my application working in Processing 2 alpha and in Processing 1.2 on Ubuntu 10.04 as apparently this RXTX issue is a bug in Processing 1.5.

I'm still working on this (now looking for a solution to the stale lock file error) but at elast my Processing program is talking as it should with the Arduino/Teensy++. Hope the above helps someone else.