rwldrn/johnny-five — pull request #164 by ajfisher (2013-07-11 11:46:40+00:00)
Title: Added a Directional Motor object

The base Motor object was serviceable but a little basic (ie only on and off). There looked to be some stubbed but commented out code for direction however the object needs some refactoring due to needing additional pins etc.

Rather than breaking a lot of motor code, I've made a "Directional Motor" object which provides the ability to go forward and reverse. It's based on a standard h-bridge style controller (eg an Ardumotor shield) so that one digital out pin drives direction and a PWM pin provides speed.

There's an example (directional-motor.js) as well to see it in action.