Pages: [1]   Go Down
Author Topic: Arduino Uno SMD + openFrameworks + Firmata ok on OS X but not Ubuntu  (Read 2037 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all,

I'm using the Arduino Uno SMD version in an openFrameworks project (oF version 0062) using Firmata (the standard Uno version that comes with the latest Arduino IDE). Everything works great on my development platform (OS X 10.6) but when I move to Ubuntu 10.10 I'm having problems. Since Arduino is running Firmata, I'm assuming I don't even have to get the Arduino IDE running on Ubuntu. So when I plug in the Arduino, I can see that it's running on /dev/ttyACM0. I switched my openFrameworks code to connect on this port, and though it is not listed among the enumerated devices, it reports that the Arduino is set up correctly. Also, I can run the oF Firmata example, though it seg faulted once or twice.

The circuit is simple, I've just got a bunch of momentary switches (joysticks) wired directly from the digital inputs to ground. I set the pins to be inputs, and I turn on the internal pullup resistors so that each pin reads '1' when the switch is disconnected, and '0' when it is connected. So, with all my joysticks disconnected, all pins return '1'.

However, in linux the digital inputs are not all returning '1' like they are supposed to. Pins 2 and 3 return 1, but the rest are returning 0. Also, sometimes my program seg faults for no apparent reason. I assume this is related to the seg faults I experienced with the openFrameworks Firmata example.

I don't really know where to start debugging this... any ideas?

-Nathan
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I went ahead and installed the Arduino IDE so I could run my initial test sketch, and that worked just fine (all inputs reporting '1'), so I think it has something to do with either Firmata or openFrameworks on linux.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Further debugging shows that the Arduino is working as expected - I ran a quick test in Processing using their Firmata library on both OS X and Linux and it works great.

So it's down to a bug somewhere in openFrameworks, either in ofArduino or ofSerial.

At first I didn't think any of the pins were working in Linux but as it stands pins 2 and 3 are working correctly; all other pins are returning '0'.

Still, if anyone in this forum has ideas I'm all ears.
Logged

Pages: [1]   Go Up
Jump to: