You are reading a single comment by @MaBe and its replies. Click here to read the full conversation.
  • // led sample for Puck.js
    var LED = [LED1,LED2,LED3]; // array of leds
    var BTN = BTN1;             // name of button
    var i = 0;
    var count = LED.length;
    
    setWatch(function (e) {
            LED[i%count].write(e.state);
            if (! e.state) i++;
          },
          BTN,
          { repeat:true, edge:'both',debounce : 20 }
    );
    
About

Avatar for MaBe @MaBe started