Hi experts,
Since I was having issues with making PWM work with Adafruit python library, I am now trying the use the bonescript to see if it can help. All I am attempting now is make an LED come up. I am getting an error and I am not sure how to resolve. My environment is ubuntu 14 on BBB. Thanks for help.
Please see dummy.js :
ubuntu@ubuntu-armhf:~/sandbox/nodearea$ cat dummy.js
var b = require(‘bonescript’);
var led = “P8_13”;
b.pinMode(led, b.OUT);
b.digitalWrite(led, b.HIGH);
Running it give me:
ubuntu@ubuntu-armhf:~/sandbox/nodearea$ sudo nodejs dummy.js
/home/ubuntu/sandbox/nodearea/node_modules/bonescript/index.js:161
if(typeof resp.err != ‘undefined’) {
^
TypeError: Cannot read property ‘err’ of undefined
at Object.f.pinMode (/home/ubuntu/sandbox/nodearea/node_modules/bonescript/index.js:161:19)
at Object. (/home/ubuntu/sandbox/nodearea/dummy.js:5:3)
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)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
ubuntu@ubuntu-armhf:~/sandbox/nodearea$