openframeworks/openFrameworks — pull request #768 by soundanalogous (2011-10-09 06:07:35+00:00)
Title: Bugfix ofArduino update to be compatible with Arduino 1.0

A change in the firmata protocol that ships with the upcoming Arduino 1.0 release will impact ofArduino (for OF users who load StandardFirmata from Arduino 1.0). The issue is a change in the pin numbering used in the Firmata library for the standard (ATMega168 and ATMega328 based) Arduinos. This commit fixes the issue while maintaining backwards compatibility with previous versions of firmata. I have also updated the firmataExample example to demonstrate how to set analog pins as digital I/O pins (this was previously broken) and also how to control a servo motor.

There are a number of new features in Firmata 2.3 that can make it easier to use Arduino with OF (and other frameworks). However ofArduino currently supports 3 different versions of Firmata so to add new features and maintain backwards compatibility would be a pain (not to mention a mess). In the near future I plan to create a new addon ofxArduino (or ofxFirmata) that will take full advantage of Firmata 2.3, adding support for pretty much any board that can be programmed via the Arduino IDE as well as new features such as I2C support (which is now part of StandardFirmata). I think ofArduino should remain as is to provide backwards compatibility, and the new addon will only support Firmata 2.3 (Arduino 1.0) and higher.