Skip to content

Instantly share code, notes, and snippets.

@beriberikix
Created February 28, 2015 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beriberikix/a1e10cf44bbc03adf2cc to your computer and use it in GitHub Desktop.
Save beriberikix/a1e10cf44bbc03adf2cc to your computer and use it in GitHub Desktop.
Testing raspi-io
var raspi = require('raspi-io');
var five = require('johnny-five');
var board = new five.Board({
io: new raspi()
});
board.on('ready', function() {
var on = new five.Pin(8);
});
@beriberikix
Copy link
Author

pi@homeautomat ~/lutron-five $ sudo node index.js
1425151147818 Device(s) RaspberryPi-IO
1425151147987 Connected RaspberryPi-IO
1425151148090 Repl Initialized

/home/pi/lutron-five/node_modules/raspi-io/lib/index.js:348
this.mode(pin, INPUT_MODE);
^
TypeError: undefined is not a function
at Raspi.digitalRead (/home/pi/lutron-five/node_modules/raspi-io/lib/index.js:348:16)
at new Pin (/home/pi/lutron-five/node_modules/johnny-five/lib/pin.js:118:25)
at Board. (/home/pi/lutron-five/index.js:8:12)
at Board.emit (events.js:104:17)
at process._tickDomainCallback (node.js:381:11)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment