You are reading a single comment by @MaBe and its replies. Click here to read the full conversation.
  • @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 }
    );
    
About

Avatar for MaBe @MaBe started