2016-11-29 43 views
1

我很難嘗試使用groovepi和pi 3來查找nodejs示例。我想要做一個簡單的hello世界上,我發現與愛迪生愛迪生groovepi樣品,但顯然沒有奏效。無法打開moddep> file'/lib/modules/4.4.26-v7+/modules.dep.bin

做了一點研究,我找到了johny五個庫,但它只適用於arduino,但它們應該有其他板子的插件,比如覆盆子,所以安裝rasp-io,johnny五並試圖運行這個示例

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); 
}); 

我得到這個錯誤:

[email protected]:~/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

嗯..(抓我的頭) 我不知道。

您可能沒有必要的權限來訪問該文件使用child_process