• I've made a new e-Paper Display driver (cloned from SSD1606 driver) that works with newer e-Paper displays that support partial update. It's currently working with WaveShare's 200x200 1.54 inch display and 'should' work with Crystalfontz e-Paper displays (at least the 122x250 CFAP122250A0-213) but I haven't gotten around to testing that display yet.
    As far as I can tell, these displays use the SSD1608 chip and, while I'm still testing, I thought I'd let y'all have a glance.

    The advantages of partial update are:
    Faster update,
    only selected region is modified so fixed image background is maintained,
    no flicker on update.

    With this implementation, each partial region can have it's own graphics object that can be updated independently (in theory, I haven't tested this yet ;-)

    In the photo below, the background was erased and the 'standard' Hello World message written. Then a partial region was created and it is updated every ten seconds with the time of day. Boring yes, but if multiple regions can be supported (memory might be an issue) then very useful.

    More later, Enjoy...


    2 Attachments

  • That's great! Not sure if you're interested but you can use g.getModified() to get the area of the Graphics object that has been changed, so potentially you could make the ePaper update just magically do partial updates as and when they were needed.

  • Thanks, I'll check out g.getModified. Right now I have a bunch of testing to do. Will PR the new driver when I'm confident that it's ready. It would be nice if I could query the rotation of the 'g' object (within display.partial()) so I don't have to rearrange the coordinates and sizes when the partial object was created.

    Also, I am having a bit of trouble making images for testing. It seems your online tool is treating 'transparent' as black and everything I've tried is Black on transparent... I need to re-'color' the images for White on transparent unless there's a switch I'm missing on your tool.

  • As far as I know, there's no getRotation - so yeah, trying to do a new Graphics could be a pain.

    your online tool is treating 'transparent' as black

    There should really be a switch for that, but right now all you have to do is remove transparent:0 from the finished JSON.

  • but right now all you have to do is remove transparent:0 from the finished JSON.

    This won't work as the bits in the B64 text are all black. It's not that big a deal, it's easy enough to convert transparent to white in the image. It's just something that slowed down my testing last night.

    As far as I know, there's no getRotation - so yeah, trying to do a new Graphics could be a pain.

    It would be easy to add, but I didn't want to mess with the Graphics library. That's a much bigger change than updating a module... I am considering adding rotation the .partial parameter list. Maybe make it an option?

  • Ok, multiple partial updates works, although images need to be inverted color from my expectation for some reason, but that's probably just a learning thing...
    I'll try the Crystalfonz display next, but the attached photo shows the direction I'm going.


    1 Attachment

    • epaperTherm1.jpg
  • Hi @TomWS

    cool 😎 , I like it.

    what fonts do you use for your project?
    I guess you use Espruino vector font and some images.

  • Thanks!

    what fonts do you use for your project?
    I guess you use Espruino vector font and some images.

    Busted! :-)

    Other than the time & date, the text in the photo was part of the image put in as background. It may still be done that way for most of the text since the background will be common to all the thermostats in the house and the image can be made and distributed by the home server. The only thing completely local to the thermostat is the temp & rh. You are correct that the date/time used the espruino vector font.

  • Ahh - you meant transparency in the input image? The converter just ignores the alpha channel, so it'll be using whatever colour there is even when it's set as fully transparent.

  • Hey guys, i am new here.
    @TomWS how does your code work?
    Because my espruino IDE says "Module SSD1608 not found" and I have the same display module . Can u help me?

  • @Dett,

    There is only the SSD1606 driver in the Espruino library at http://www.espruino.com/modules with driver at http://www.espruino.com/modules/SSD1306.­js

    Initially I wanted to ask you the following questions, but after looking for the driver, you can skip them (only number 5 and somewhat 7 are of some relevance).

    1. are you using the Espruino Web IDE in Chrome browser for code development?
    2. are you coding in the right-side pane - the code editor (the other side is the REPL console)?
    3. are you internet connected while you upload the code (hit the upload button)?
    4. do you see your upload to have completed (prompt shows in console)?
    5. when do you get the error message: a) while uploading?- or - b) after completed upload?
    6. is there any other error before the error you mention?
    7. lastly: what a bout a type on ...require("SSD1608");... ?

    @TomWS ' very first line states:

    I've made a new e-Paper Display driver (cloned from SSD1606 driver) that works with newer e-Paper displays that support partial update.

    Espruino has a local sandbox in which you can create your own modules... and that is what @TomWS did. He made copy of the SSD1606.js with name SSD1608.js and stored it there.

    To get started with the display, just use the SSD1606 module. It just works fine... https://www.espruino.com/SSD1606 . The driver code at http://www.espruino.com/modules/SSD1306.­js shows you in the comment also other configurations for other ePaper displays.

    If you want to use @TomWS' functionality, you may need to ask him for his clone! ...ask him to publish it here or as pull request to update the publicly available module library... (Since it is a actually a SSD1306 oriented driver, I'd have call it something like SSD1306X, for extended... or a like).

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

New e-Paper driver for displays supporting partial update.

Posted by Avatar for TomWS @TomWS

Actions