2

I am having hard time trying to find nodejs samples with the groovepi and pi 3. I want to do a simple hello world, I found a groovepi sample with intel edison but obviously that didnt work.

Doing a little of research, I found johny five library but that its only for arduino, but they are supposed to have plugins for other boards, like raspberry, so installed rasp-io, johnny five and tried to run this sample

var raspi = require('raspi-io');
var five = require('johnny-five');
var board = new five.Board({
io: new raspi()
});

board.on('ready', function() {

var lcd = new five.LCD({
controller: "JHD1313M1"
});

lcd.bgColor(r, g, b).cursor(0, 0).print(f);
});

I get this error:

pi@raspberrypi:~/share/Sample2 $ node index.js modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin' child_process.js:531 throw err; ^

Error: Command failed: modprobe i2c-dev modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'

at checkExecSyncError (child_process.js:488:13) at execSync (child_process.js:528:13) at new I2C (/home/pi/share/Sample2/node_modules/raspi-i2c/lib/index.js:120:33) at new Raspi (/home/pi/share/Sample2/node_modules/raspi-io/lib/index.js:161:14) at Object. (/home/pi/share/Sample2/index.js:5:7) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3)

I want to do a simple hello world on the LCD display I got in they key

0

Maybe the error comes from trying to run a new program without rebooting your rpi. I got the same error after installing OpenVPN and trying to run it asap.

I did the following to "solve" this problem:

apt-get update && apt-get dist-upgrade
reboot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.