• Got it... used following code (r2() w/ 10ms vs. r() w/ iTm=4ms):

    function r2() {
      setInterval(function() {
        var rdx = 5;
        dnoe.reset(); // enable outpu
        while (rdx) SPI1.write(dbuf[--rdx],dnss);      
        dnoe.set();   // disable output
      }, 10);
    }
    
    function r() { // run
      dnoe.reset();
      rdx = 4;
      iId = setInterval(function(){
          rdx = ++rdx % 5;
          SPI1.write(dbuf[rdx],dnss);      
      }, iTm);
    }
    

    I

    It's a little bit dimmer, but it works... less duty cycle but the advantage of begin more consistent.

    Two shots attached show the different intensities and clip attached shows flipping between r2() and r().


    2 Attachments

About

Avatar for allObjects @allObjects started