I'm a beginner on BBB JS programming, just playing around with examples.
Following
BeagleBone Black Cookbook Webinar Series: Recipe #2- Displaying GPIO status in a Web Browser
After I paste the code:
setTargetAddress('192.168.7.2',
{initialized: run}
);
function run() {
var b = require('bonescript');
b.pinMode('P8_19', b.INPUT);
getButtonStatus();
function getButtonStatus() {
b.digitalRead('P8_19', onButtonRead);
}
function onButtonRead(x) {
$('#buttonStatus').html(x.value);
setTimeout(getButtonStatus, 20);
}
}
into cloud9, it says there is an error in first line: "setTargetAddress not defined"
What's problem here? Did I need to install anything?
Thanks!