I am at chapter 6 of Getting Started with Arduino (
http://makezine.com/getstartedarduino/) and I am having problem with my Processing code. Specifically:
String arduinoPort = Serial.list()[0]; // I checked that the right port is returned
port = new Serial(this, arduinoPort, 9600); // port was previously declared as "Serial port;"
Cause this problem:
" To use the serial library, first open
Applications -> Utilities -> Terminal.app
and enter the following:
sudo mkdir -p /var/lock
sudo chmod 777 /var/lock
Exception in thread "Animation Thread" java.lang.RuntimeException: Please use Tools ? Fix the Serial Library.
at processing.serial.Serial.<init>(Serial.java:153)
at processing.serial.Serial.<init>(Serial.java:116)
at example_8a_lamp_sketch_processing.setup(example_8a_lamp_sketch_processing.java:67)
at processing.core.PApplet.handleDraw(PApplet.java:2103)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:680)
"
(the rest of the code is here:
http://examples.oreilly.com/0636920021414/ch06/Example_08A/)
Any ideas ?
Thanks a lot !
Bernardo