Epd.sleep(), machine.deepsleep() and partial updates: It's Possible!!! #12
julien123123
started this conversation in
Ideas
Replies: 1 comment
-
Here, I decided to make the demo file with annotations: https://gist.github.com/julien123123/9ec01d29f1dbf63ccfee3fc34e533984 It works with the contents of the examples folder of the library, and the file has to be main.py so that the deepsleep portion works. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
First, thanks @phoreglad for writing that library!
I was looking for a way to save energy for a clock program that I am developing. I really wanted to be able to put my esp32 in deepsleep and not have to do a full update every time because it would be way too annoying. At first, I thought I had to rewrite parts of your library, and then I stumbled upon this article that suggested there was a simpler way.
As you may know, if I do a partial refresh after the display has been put to sleep, it will just put the new update over what was already on there. But, if I save the permanent buffer, aka 'epd._buffer_red', and I send it to the e-paper driver chip over SPI after a re-init after sending the command 'epd._send_command(0x26)', without sending the display update command, I can do my partial update as usual, and it will show the same way as if I never sent the display to sleep. If I want to send my esp32 to go into deep sleep in between updates, I can just send the last "permanent" buffer in a JSON file and load it on every wake up. (Yes, I totally broke the headers of the pico e-paper display to make it fit in a neat case with my esp32)
I thought it would be interesting for you to test and maybe add as a method. I wrote an example script for that, but I didn't know if it was useful to share it, as I'm using specific fonts with the Writer library.
Beta Was this translation helpful? Give feedback.
All reactions