###前提・実現したいこと
ラズパイでGPIOの値を取得したいのですが、ファイルを実行しようとすると次のようなエラーが出ました。
###発生している問題・エラーメッセージ
/home/pi/Desktop/node-gpio/node_modules/bindings/bindings.js:83 throw e ^ Error: /home/pi/Desktop/node-gpio/node_modules/epoll/build/Release/epoll.node: undefined symbol: node_module_register at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at bindings (/home/pi/Desktop/node-gpio/node_modules/bindings/bindings.js:76:44) at Object.<anonymous> (/home/pi/Desktop/node-gpio/node_modules/epoll/epoll.js:1:99) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12)
###該当のソースコード
javascript
1var express = require('express'); 2var router = express.Router(); 3 4var GPIO = require('onoff').Gpio; 5var pin = new GPIO(4, 'in'); 6 7/* GET users listing. */ 8router.get('/', function(req, res, next) { 9 console.log(pin.read()); 10 pin.unexport(); 11}); 12 13module.exports = router;
###試したこと
node.jsのバージョンを変更しようとしたが、どういったバージョンに変更すればよいかわかりません。
###補足情報(言語/FW/ツール等のバージョンなど)
より詳細な情報
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/10 19:42