Hello,
I am using a beaglebone Black Rev C I am trying to run a simple program to make an led ON with a push button.But getting this error /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/blinkled/readButton.js:7: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 Module.runMain [as _onTimeout] (module.js:497:10) My code is.... var b = require('bonescript'); var led = "P9_14"; var button = "P8_11"; b.pinMode(led, b.OUTPUT); b.pinMode(button, b.INPUT); var state = b.LOW; b.digitalWrite(led, state); b.attachInterrupt(button, true, b.CHANGE, toggle); function toggle(x) { if (x.value == b.HIGH) { console.log("The button is HIGH"); b.digitalWrite(led, b.HIGH); } else { console.log("The button is LOW"); b.digitalWrite(led, b.LOW); } } I am getting this error by making the P9_14 an output.. -- 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 beagleboard+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/a6ee497f-1911-440b-b84a-14b941795281%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.