|
|
|
|
|
by z3t4
3882 days ago
|
|
With JavaScript (nodejs) var lightsOn = true;
setInterval(blink, 2000);
function blink() {
var fs = require("fs");
fs.writeFile("/sys/class/leds/beaglebone:green:usr0/brightness", lightsOn, function (err) {
if (err) throw err;
});
lightsOn = lightsOn ? false : true;
}
|
|
lightsOn = !lightsOn;
I'll see myself out.