Add a pin object for direct controll of a pin rather than i being wrapped in a device specific class.
ps i dont know how useful the attached code is but I thought i may help.
We could do something similar, but I'd rather make a generic Pin class that initializes "pin control instances"
That sounds useful, would it be a good idea if it had access methods as well as emitting events?
// will guess that this is digital and assume you mean "input" mode until you write something to it,
// which it will then automatically switch to "output" mode.
var dig = new five.Pin(13);
// Or manually... (it won't be hex like that)
dig.mode( 0x01 );
// set it high...
// set it low...
// ... which also emits a "high" and "low" event...
// will guess that this is analog... same as above.
var ana = new five.Pin("A0");
I'll keep on working on this later tonight.
That looks good, much simpler than I was making it
Direct Pin control: new five.Pin(#). Closes gh-87
Signed-off-by: Rick Waldron <email@example.com>