You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi,

    You could build your own firmware with support for the LCD built in, and that would be a lot faster.... Or since you have ESP32 you probably have enough free RAM to allocate one big buffer rather than using paletted.

    The code for paletted is at https://github.com/espruino/EspruinoDocs­/blob/master/devices/ILI9163.js#L107-L13­1

    And I imagine the code to write the image direct with just a big buffer would be something like:

    exports.connectBigBuffer = function(spi, dc, ce, rst, callback) {
      var g = Graphics.createArrayBuffer(LCD_WIDTH, LCD_HEIGHT, 16, { msb:true });
      g.flip = function() {
        ce.reset();
        spi.write(0x2A,dc);
        spi.write(0,0,0,LCD_WIDTH);
        spi.write(0x2B,dc);
        spi.write(0,0,0,LCD_HEIGHT);
        spi.write(0x2C,dc);
        spi.write(g.buffer);
        ce.set();
      };
      init(spi, dc, ce, rst, callback);
      return g;
    };
    
About

Avatar for Gordon @Gordon started