ofArduino: "OF_ERROR: ofSerial: trouble reading from port"


I´m using the ofArduino class for the first time, for now i’m just trying to read a value that is being sent from an arduino.
I keep getting the message “OF_ERROR: ofSerial: trouble reading from port” when i call update() on the ofArduino class
here’s my code

Arduino code:

void setup(){  
void loop(){  

OF code:

void testApp::setup(){  
	string serialPort = "/dev/tty.usbserial-A600aisN";  
	arduino.connect(serialPort, 9600);  
void testApp::update(){  

The weird thing is that using the same port and baud with ofSerial doesn’t throw me an error. And it also works in Processing using the same port and baud settings.
I’m using an Arduino Duemilanove and on a macbook with snow leopard

Any one knows what could be wrong here?
I’m pretty noob in Arduino stuff…



to use ofArduino you need to upload the standard firmata sketch to the arduino not a custom program. the idea with firmata is that you don’t need to program the arduino but just OF.

you can find standard firmata in the arduno ide in sketches >libraries >firmata >standard firmata

or something similar dont have the arduino ide right now.

take a look at the firmata example to know how to use it

yea thats it! :slight_smile:
thanks Arturo