Inky Frame - is there a faster way to write to the buffer?

Hello,

I have an Inky Frame 7.3 with the Spectra display and the 2W Zero Pi.

My issue is, that whenever I try to display an already dithered 800x480 image on the display, it seems to take about 15-20 seconds for the screen to start refreshing (I know that this part also takes this long). I tried with pngdec, jpgdec, and also directly writing the pixels on the buffer, but all of them take this long.

Did anyone find a way to display an image without this delay?

The best thing to do is to instrument the driver. I.e. add some print-statements with a timestamp and see where it is loosing time. The relevant driver file is inky/inky_e673.py.

After a lot of trial and error, I found out that the problem is that there is no way to write more than 1 pixel to the display buffer at a time, and since the display buffer is located in the PSRAM, which communicates via SPI, there’s quite some overhead when communicating pixel by pixel for the entire display.

So I have forked the firmware, exposed the method of the display driver which can write a byte array there, and then also added an extra method to the pico_graphics library to pass on the byte array in chunks.

I have reduced the 20 seconds now to less than 5 seconds (of which 1.8s is basically reading the file from the SD card).

I put my compiled firmware here, with some more detailed description and a usage example (this is only for the Pico 2W Spectra Inky Frame 7.3, but if you follow the code in the last commit, it should be easy to do for other similar boards).

I just ordered one of these,

Which is I believe the “Spectra” version your referring too.

It’s my first foray into E-Ink displays. I’ll be giving your code a try for sure, thanks for posting the link. =)

Yes thats the one, updating the firmware with the one from the github release should make the extra method available in micropython

Did you create a PR or at least open an issue in the Pimoroni Repos? Upstreaming this fix would probably help when future releases of the firmware are created.

Problem is that this method only works on the 7.3 Pico 2W inky frame, since that is what I can test with. There are a lot more flavors, which don’t compile with my version now. There is an open issue on the repo where I have added this same comment with my solution, but it has been open for 1.5 years now, so I don’t think there is a will from Pimoroni for adding this extension.

Calling @hel for help: is there anything you can do to change this? It seems like an important fix if pre refresh times are reduced from 20s to 5s. This will really add to battery life on the InkyFrame.

I also support this request, @hel ;)

@dzolnai Sorry that we haven’t had managed to check it out yet! I can’t see any open PRs on the Inky Frame library, please can you drop a link in this thread?

I didn’t make a PR, because my code only modifies one variant, so it won’t compile for others.
If you think that this would be a good addition, I could make a try to make it work for others, but I would not be able to test it. Here is the commit with the changes I made: picographics: add draw_raw_chunk() method, expose driver method for w… · dzolnai/pimoroni-pico@44f2525 · GitHub

Is there any chance this technique would help with Inky Frame with RP2040?

The technique should work, but it requires a different firmware