node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



An extendable implementation of Johnny Five's IO Plugins.

Implements all required and optional methods, along with the required constants - MODE, HIGH, LOW, etc.

You should configure the relevant pins of your board in your constructor, then emit the ready event.


var util = require('util'),
  IOBoard = require('ioboard');
MyIO = function(path, callback) {
  // call super constructor;
  // connect to hardware and emit "connected" event 
  // .. configure pins 
  // all done, emit ready event 
  // finally call the passed callback 
util.inherits(IO, IOBoard);

Finally implement any of the IO Plugin methods of your choosing:

// implement digitalWrite 
MyIO.prototype.digitalWrite = function(pin, value) {


By default IOBoard will print a message when every non-implemented method is invoked. To prevent this, set the quiet property of the super constructor args to true:

MyIO = function(path, callback) {
  // call super constructor, {
    quiet: true
util.inherits(IO, IOBoard);