• Not yet - I'll try and have another look soon. I think the changes improved matters slightly but it still wasn't great. To do SPI, I'd do something like:

    SPI1.setup({ mosi: output_pin, sck : pin_you_dont_use, bitrate: 125000 });
    var data = new Uint8Array(18*24);
    var n = 0;
    function push(on, cnt) { while (cnt--) data[n++]=on?0xff:0; }
    // now fill data with bytes - 0xFF for 1, 0x00 for 0
    for (var i=24;i>=0;i--) {
        if ((bits>>i)&1) {
          push(1, 13);
          push(0, 5);
        } else {
          push(1, 5);
          push(0, 13);
        }
      }
    
    SPI1.write(data);
    

    Not tested, but that's the rough idea - create a big array with 0 for off, 0xFF (all 1s) for on - and transmit it. nRF52 should do that via DMA which will be nice and smooth

About

Avatar for Gordon @Gordon started