Hey,
I’ve put some more work into the arduino support in cppGlue and it’s now at the point where I’d like to have had it at the OF Lab.
For some reason it’s not working properly at 115200 bps but If you run it at 57600 it seems to work fine. I’ve tested it against the latest Firmata and StandardFirmata (v2b3).
If you check it out at cppglue.googlecode.com you’ll also find some updated example code as well.
The basic idea is that there’s a StandardFimata class that complies with StandardFirmata sketch on the Arduino. It should be plug and play, except that you might have to turn down the baud rate to 57600.
Then there’s a Arduino class that currently extends standard firmata with servo, wire (I2C), and sht sensor support. However to get this working you need to use GlueFirmata on the arduino, and install all of the arduino libraries it depends on.
I will try to keep StandardFirmata up to date with the latest release of the StandardFirmata sketch. Once the final StandardFirmata 2.0 on the Arduino is released I’ll tag everything, but it’s pretty set now so I don’t expect there to be much changes on the OF side.
Arduino and GlueFirmata might see more changes though since I put in stuff that I need for specific project but can’t achieve through StandardFirmata, like wire, blinkM and SHT sensor support for example… some of this could prove useful for others and might eventually trickle down to StandardFirmata, but until it does I think it’s wise to keep it separated.
So, for OF i think a good idea could be to make an ofArduino class that simply extends StandardFirmata. It should be plug and play and easy to use for beginners, except that they unfortunately might have to change the baud rate in the StandardFirmata sketch on the arduino.
If you release it for OF without poco you’ll have to comment out the events, but that should be it since it now uses ofSerial…
hope you find it as useful as I do,
btw, I’ve also updated the DmxPro class to use ofSerial and it works fine (at least up to 509 channels)…