Beagleboard.org
Siguiente →
La BeagleBoard es una single board computer, hardware libre, de bajo consumo producida por Texas Instruments en assocacion con Digi-Key & Newark elemnts. Utiliza el chip OMAP(Open Multimedia Applications Platforms) 3530 de Texas Instrument.
var b = require('bonescript'); var led = "P8_13"; var state = 0; b.pinMode(led, 'out'); toggleLED = function() { state = state ? 0 : 1; b.digitalWrite(led, state); }; timer = setInterval(toggleLED, 100); stopTimer = function() { clearInterval(timer); }; setTimeout(stopTimer, 30000);
var b = require('bonescript'); var ledG = "P8_13"; var ledY = "P8_14"; var ledR = "P8_15"; b.pinMode(ledG, 'out'); b.pinMode(ledY, 'out'); b.pinMode(ledR, 'out'); startGreen(); function startGreen(){ b.digitalWrite(ledG, b.HIGH); setTimeout(stopGreen,5000); } function stopGreen (){ b.digitalWrite(ledG, b.LOW); b.digitalWrite(ledY, b.HIGH); setTimeout(startYellow,3000); } function startYellow(){ b.digitalWrite(ledY, b.LOW); b.digitalWrite(ledR, b.HIGH); setTimeout(startRed,5000); } function startRed(){ b.digitalWrite(ledR, b.LOW); }