You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Nice - thanks! You could definitely improve the Sharp Memory LCD library by the look of it - I don't have time to try an actual one here, but changing this in the existing library should work:

    1. g.flip = function () {
    2. digitalWrite(cs,1); // CS on
    3. spi.write([0b00000001,1]); // update, 1st row
    4. var w = g.getWidth()>>3, h = g.getHeight();
    5. for (var y=0;y<h;y++)
    6. spi.write(new Uint8Array(g.buffer,y*w,w),[0,y+2]); // pad and do 2nd row
    7. digitalWrite(cs,0); // CS off
    8. };

    Also any calls to spi.send could be spi.write - it doesn't try and read data so it never has to allocate anywhere to put the received data.

About

Avatar for Gordon @Gordon started