firmata.js
firmata.js copied to clipboard
change the way analog and digital pin reporting values are changed
To better support the skipCapabilities functionality, the way analog and digital pin reporting should be changed to eliminate the dependency on the analog pin map. There may be other changes as well that can ensure the user can read and write analog pins when skipCapabilities is set to true, without the need to pass in an analog pin map.
Johnny-Five uses the analogPins array to figure out what pin number value to use when a user program wants to use an analog pin as a digital pin five.Led("A0") or five.Servo("A0"). Since that actually needs to be 14 (w/ an Uno), "A0" -> index 0 of analogPins -> 14.