I'm trying to use the johnny-five Node.js framework with raspi-io to do a hello world example based on this tutorial. Here's my code:
var five = require("johnny-five");
var Raspi = require("raspi-io");
var board = new five.Board({
io: new Raspi()
});
board.on("ready", function() {
console.log( "Board ready." );
});
When I run it, I get the following error:
Error: Command failed: modprobe i2c-dev
/bin/sh: 1: modprobe: not found
at checkExecSyncError (child_process.js:1339:13)
at execSync (child_process.js:1379:13)
at new I2C (/home/pi/sandbox/node_modules/raspi-io/node_modules/raspi-i2c/lib/index.js:122:5)
at /home/pi/sandbox/node_modules/raspi-io/lib/index.js:154:16
at new Raspi (/home/pi/sandbox/node_modules/raspi-io/lib/index.js:189:7)
at Object.<anonymous> (/home/pi/sandbox/button.js:4:7)
...
I've enabled SPI and I2C in raspi-config, although I'm not sure if that is related. Running modprobe i2c-dev
confirms that modprobe
does not exist. Am I missing something? I've also tried reinstalling module-init-tools
, as suggested in this non-raspi thread: modprobe not found at all.