firmata/arduino — pull request #15 by soundanalogous (2013-02-03 17:44:00+00:00)
Title: Stepper motor support for StandardFirmata

This pull request adds stepper motor support to StandardFirmata. Stepper motors in 2 wire and 4 wire configurations are supported as well as the EasyDriver (and likely other step + direction stepper motor drivers). Acceleration and deceleration is also supported.

Because the Stepper library included with Arduino is blocking and relatively limited, I took the approach of including a library (FirmataStepper) with the StandardFirmata sketch. I created a custom stepper library for this application based on this [paper](http://www.atmel.com/Images/doc8017.pdf) and associated source code.

Potential issues here are the size of the sketch. The inclusion of the stepper library pushes the compiled size to exceed 14k which means it is too large for older Arduinos and other microcontrollers with 16k or less of memory (keeping in mind that the Arduino bootloader takes up 2k).

This code has been tested thoroughly to ensure that there are no conflicts with existing code. I've been using it in my BreakoutJS client library for a couple of months as well and have not encountered any issues when using one or two stepper motors in addition to digital in/out, analog in, pwm out, and multiple i2c devices simultaneously.

Opening here for discussion. This request should not be merged until the issues marked "priority" have been completed.