You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • There isn't anything I'm aware of. Ideally we'd need a new function that allows Espruino's interpreting of those {data,count} blocks to work on existing buffers, but that doesn't exist yet.

    Best bet on official boards is to use JIT:

    var countNP = 100;
    var neopixelStrip = new Uint24Array(countNP);
    var fiveLEDs = new Uint24Array(5);
    fiveLEDs[2] = 30;
    function repeatPattern(strip, pattern, count) { "jit"
      for (var i=0;i<count;i+=5) strip.set(pattern,i);
    repeatPattern(neopixelStrip, fiveLEDs, countNP);

Avatar for Gordon @Gordon started