rwldrn/johnny-five — pull request #147 by divanvisagie (2013-06-23 11:42:16+00:00)
Title: Added totalPin mapping for the MEGA

Mapped The totalPins for the mega. To be fair its a small commit and still doesn't fix issues with the MEGA but it's a step in the right direction.

Used this to map pins, it will make pin mapping easy in future for other boards:

five.Board().on("ready", function() {

var pi = [];
var pins = this.firmata.pins;

for ( var i in pins ){

pi.push( pins[i].supportedModes.length );
}
console.log( pi );

});