You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hmm... I did try it out - I deleted that function definition and it worked...

    I just saw the fillRect issue - I'll look into it...

    flip is the name of the function I've been using in display modules when they send the data over to the display. For example PCD8544 and the source.

    You could do something a bit like:

      display.flip = function(){
        var tmp = new Uint8Array(17);
        // tmp[0] = 0x00; // initialiased to 0 anyway
        tmp.set(graphics.buffer, 1);
        i2c.writeTo(address, tmp);
      };
    

    ... assuming you have the buffer - but unfortunately right now graphics can only do 1,8,16,24,32 bits. It'd be good to add more options though.

    at the moment you can use 'ArrayBufferViews' to re-interpret array data very efficiently though:

        var tmp = new Uint8Array(17);
        // tmp[0] = 0x00; // initialiased to 0 anyway
        tmp.set(new Uint8Array(displaybuffer.buffer), 1);
        i2c.writeTo(address, tmp);
    
About

Avatar for Gordon @Gordon started