@allObjects
var LEDS = [LED1,LED2,LED3]; // array of leds var BUTTON = BTN1; // button var count = LEDS.length; var i = 0; setWatch(function (e) { LEDS[i%count].write(e.state); if (! e.state) i++; }, BUTTON, { repeat:true, edge:'both',debounce : 20 } );
@MaBe started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@allObjects