• All I can suggest is that you access the underlying array with g.buffer and re-order the pixels yourself before sending them.

    // g = Graphics
    leds = new Uint8Array(16*16*3);
    
    g.flip = function() {
      leds.set(new Uint8Array(g.buffer,0,8*3), 0);
      leds.set(new Uint8Array(g.buffer,8*3,8*3), 8*8*3);
      leds.set(new Uint8Array(g.buffer,2*8*3,8*3), 8*3);
      // etc ...
      SPI1.send4bit(leds,...);
    }
    
About

Avatar for Gordon @Gordon started