I ordered an e-Paper module from Amazon. It's a nice display that is 128x296 pixels and only consumes power when you are updating the display. I plan on using the display in a few projects and I thought it would be fun to write a lightweight display driver for it, so I can program it for the Arduino or ESP32.
The driver basically lets you clear the display memory, set pixels on at various locations, update the display with the image & then put the device to sleep. There is no higher level abstractions like fonts or shapes, since my use cases won't typically need them and memory is fairly rare. I wrote it based on reading the spec that was available from Waveshare.
It was a fun project, as there were a few things in the spec that weren't clear or where you needed to do something slightly different than what was in the spec (like adding a delay between steps 4 and 5). One think that I still can't figure out is how to set the RAMX and modes so that I only need to send the display lines (right now there are a few extra bytes per row that I'm sending that get ignored.) At least the in-memory representation only uses the amount of memory needed for storing the drawing.
I posted the repository at https://github.com/jamisonderek/qr-wifi/tree/main/libraries/escreen
Here is what it looks like if you follow the README.md file and run the BoundingBox example:

Comments