ofArduino and Raspberry Pi

Hello,

I am experimenting with ofArduino and Raspberry Pi and I am getting rather strange problem.
Serial communication example compiles ok, but cannot somehow start communicating with the device (even though it tells me firmata version and everything in the console).
I noticed, that when I open a serial console (minicom) and close it, it magically starts to work. Any idea what that can be connected to?
Also - when it is not working, RX/TX diodes are blinking in baud rate (I assume), but when it is running (my program only requires only one analog reading at longer times) it blinks more sparse.

Thanks a lot for any tips!

Jonas

hi,
i faced the same problem.

i found a solution, but i’m not sure it’s an elegant one :slight_smile:

before you start your app, execute following command: stty raw crtscts -F /dev/ttyACM0
i think it’s kind of a hardwarehandshake

i put this command into my .bash_profile, so with every boot it gets executed.

greets

Thanks for this, it was doing my head in.

/A

doktorsuarez, thanks for this. This fix works equally well when creating a connection to the GPIO Serial pins (ttyAMA0). Could not figure out why my application would only communicate over the pins if I ‘tested’ the connection with minicom first. I must have been inadvertently doing the same thing by establishing a connection there first.

maybe this is related
http://www.hobbytronics.co.uk/raspberry-pi-serial-port

This could be a better solution, without need to start stty. I’ve tested on a Linux Debian, but since Raspberry distro is very similar, it should work smoothly

http://forum.openframeworks.cc/t/einitialized-never-fired-with-ofarduino/15704/4

1 Like

vcuculo’s solution did work for me for Raspberry Pi with Raspbian Wheezy.