Did you try the number zero rather than the letter Oh?
Chad

On 8/20/2014 4:06 AM, [email protected] wrote:

Hello! How's everything?

I encountered strange error when running simple *.js file
setting a pin to output using beaglebone black Rev C which I received this August.

I even reinstalled bonescript using
"npm install -g bonescript"
but still encounter the same error message.

led = "P9_11", "9_12" worked
led = "P8_39", "P8_40", "P8_41", and many other pins
do not work with error message listed below
following "simpleDigitalOut.js":

//====================================
//simpleDigitalOut.js

var b = require('/usr/local/lib/node_modules/bonescript');

var led = "P8_41";
b.pinMode(led, b.OUTPUT);

console.log("end of program");

//=====================================
root@beaglebone:/var/lib/cloud9/myProg <mailto:root@beaglebone:/var/lib/cloud9/myProg># node simpleDigitalOut.js

/usr/local/lib/node_modules/bonescript/my.js:57
            if(slot[0]) {
                   ^
TypeError: Cannot read property '0' of null
at Object.exports.load_dt (/usr/local/lib/node_modules/bonescript/my.js:57:20) at Object.exports.create_dt (/usr/local/lib/node_modules/bonescript/my.js:123:33) at Object.exports.setPinMode (/usr/local/lib/node_modules/bonescript/hw_capemgr.js:83:12) at Object.f.pinMode (/usr/local/lib/node_modules/bonescript/index.js:160:15)
    at Object.<anonymous> (/var/lib/cloud9/myProg/simpleDigitalOut.js:4: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)
root@beaglebone:/var/lib/cloud9/myProg <mailto:root@beaglebone:/var/lib/cloud9/myProg>#
//=====================================

I googled but cannot find a solution to this problem.

It would be a great help if you can guide me through it.
your advice is very much appreciated.

Many thanks,
Fung Yang

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.


--
For more options, visit http://beagleboard.org/discuss
--- You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to