Processing won't talk to Arduino
in
Integration and Hardware
•
2 years ago
Hi All,
I am going absolutely insane getting my Processing sketch to run with my Arduino on Linux (Ubuntu 10.04).
I have imported the processing.serial.* library and setup the "myPort = new Serial(this, Serial.list()[0], 9600)" accordingly.
I have added myself to the uucp and dialout group in /etc/group.
I receive the following error:
- Stable Library
- =========================================
- Native lib Version = RXTX-2.1-7
- Java lib Version = RXTX-2.1-7
- [0] "/dev/ttyUSB0"
- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
- processing.app.debug.RunnerException: ArrayIndexOutOfBoundsException: 0
- at processing.app.Sketch.placeException(Sketch.java:1543)
- at processing.app.debug.Runner.findException(Runner.java:582)
- at processing.app.debug.Runner.reportException(Runner.java:558)
- at processing.app.debug.Runner.exception(Runner.java:498)
- at processing.app.debug.EventThread.exceptionEvent(EventThread.java:367)
- at processing.app.debug.EventThread.handleEvent(EventThread.java:255)
- at processing.app.debug.EventThread.run(EventThread.java:89)
- Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException: 0
- at PointCloud_Arduino.setup(PointCloud_Arduino.java:74)
- at processing.core.PApplet.handleDraw(Unknown Source)
- at processing.core.PApplet.run(Unknown Source)
- at java.lang.Thread.run(Thread.java:619)
- Experimental: JNI_OnLoad called.
Does anyone know how to resolve this issue? I have tried recompiling the RXTX library disabling lock files but that has its own problems having to do with the kernel in Ubuntu 10.04.
1