• Umm... So I tried your new module - and yes, it's completely broken.

    But the code that I had before (without the extra 2 bytes at the end at all) works perfectly on software SPI. Perhaps it's actually an issue with Espruino's SPI and how quickly it raises the CE line after sending.

    Try:

      LCD.flip = function () {
        ce.reset();
        for (var i=0;i<6;i++) {
          digitalWrite(dc,0); // cmd
          spi.send(0x40|i); // Y addr
          spi.send(0x80); // X addr
          digitalWrite(dc,1); // data
          spi.send(new Uint8Array(this.buffer,i*84,84));
        }
        ce.set();
      };
    
About

Avatar for Gordon @Gordon started