I’ve been playing with BBB and BBG at the “top level” that I’d expect a beginner to start with – plug it in the USB port and use the Cloud9 IDE stuff. My BBB is an old A5A revision and it seems to have some issues, so lets ignore it for now,
Seems most of the BoneScript stuff either throws apparently “harmless” errors (disconcerting to a newbie, and all I can do is wave my hands and say “it doesn’t matter”) or they throw apparently severe errors and just don’t work.
I’ve setup a virgin BBG and did apt-get update and apt-get upgrade to get the “latest” into the 4GB eMMC. Is this not enough?
I find it somewhat disconcerting that the page
Is still talking about Angstrom, and apparently hasn’t been updated since the original BBW. Is this the root of my BoneScript problems?
My BBG BoneScript is not totally FUBAR as the three “Run” buttons to turn on, off, and restore the usr leds seems to work:
But the link to analogWrite() is where things go wrong.
BeagleBoard.org Debian Image 2015-03-01
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.9 (wheezy)
Linux beaglebone 3.8.13-bone71.1 #1 SMP Wed May 20 20:13:27 PDT 2015 armv7l GNU/Linux
In the webpage:
I get the expected message:
Your board is connected!
BeagleBone Green S/N BBG115091153 running BoneScript 0.2.4 at 192.168.7.2
Is this a “bad” version of Bone-script?
I was most interested in the analogWrite() bonescript because the node-red doesn’t offer access to the PWM yet, and I wanted to do an Arduino-like cyclic LED dimming demo.
When I click the “Run” button I get:
x.value = true
x.err = undefined
And the voltage at J9_P14 stays 0V, instead of the expected ~2.2V for the 0.7 width output.
So then I opened up Cloud9 IDE and in the Workspace go to Cloud9->examples->Grove_BBG->blinkled.js
when I run it I get:
debugger listening on port 15454
error: Failed to find devicetree fragment: bspm_P9_14_f
info: 0: 54:PF—
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART2
TypeError: Cannot read property ‘0’ of null
at Object.exports.load_dt (/usr/local/lib/node_modules/bonescript/my.js:57:20)
at exports.create_dt.handler (/usr/local/lib/node_modules/bonescript/my.js:93:21)
at ChildProcess.exithandler (child_process.js:656:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Socket.ChildProcess.spawn.stdin (child_process.js:979:11)
at Socket.emit (events.js:95:17)
at Pipe.Socket._destroy._handle.onread [as close] (net.js:466:12)
I did set-up node-red again and it was uneventful, I see the BBB installation instructions have been updated from the last time I did it. Worked better since it now mentions mkdir -p ~/.node-red before doing npm install of the node-red-node-beaglebone. Node-red has a few rough edges (most notably saving & loading “nodes” that you’ve wired up, and no easy way to stop or “undeploy” a buggy one), but its easy to show a newbie how to get started and do basic stuff.