HomePage RecentChanges JohnnyFive Fake

Johnny Five Fake Modules

TODO - fake.js

#!JavaScript
var util = require('util'),
  BoardIO = require('board-io');

MyIO = function(path, callback) {
  // call super constructor
  BoardIO.call(this);

  // .. configure pins
	this._pins.push({
		name: "foo",
		supportedModes: [],
		mode: 1,
		value: 0,
		report: 1,
		analogChannel: 127
	});

  // wait for an async method or use proccess.nextTick to
  // signal events
  process.nextTick(function() {
    // connect to hardware and emit "connect" event
    this.emit("connect");

    // all done, emit ready event
    this.emit("ready");

    // finally call the passed callback
	if (callback)
		callback();
  }.bind(this));
}
util.inherits(MyIO, BoardIO);

Software error:

Can't locate object method "endform" via package "CGI" at /data/scott.dd.com.au/wiki/modules/search.pl line 15.

For help, please send mail to the webmaster (webmaster@dd.com.au), giving this error message and the time and date of the error.