Scott Penrose

JohnnyFive Fake

Scott Penrose is a perl hacker with an interest in home automation. He has been playing with electronics since he was old enough to burn his fingers with a soldering iron.

Johnny Five Fake Modules

TODO - fake.js

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

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

  // .. configure pins
		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

    // all done, emit ready event

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

  • Arduino
  • Javascript
  • Edison
  • RaspberryPi