Inkplate peripheral mode image display speed optimization

Customer:

I’m looking into the possibility of using Inkplate devices as USB attached signage for PCs. I’m wondering about improving the speed of operations in Peripheral mode.

Currently when writing text using the Print function, the default font is limited, so I explored printing an image using the draw pixel function, but that was slow. I realized I can speed up pixel writing by not writing anything with colour value 7.

I looked into loading images onto the SD card, which would be faster, but I need these devices to be essentially 0 touch to set up.

Do you have any suggestions on how to improve this?

Originally submitted via email support on 28 February 2024. Migrated to the forum for community visibility.

Soldered Support:

I understand the issue with drawing images from peripheral mode. The addition to send images to be displayed via peripheral mode was something we were working on for a short while. Unfortunately, with the current state of the Inkplate library this functionality doesn’t yet exist, but I’ve made a request to get some code snippets which I can forward to you to help implement this feature, if you’re interested in doing so.

You would have to send a raw 4-byte-per-pixel datastream of the picture data. This can be made with the image converter app: Image Converter

If you wanted to convert new images at runtime on your computer and then send those to be displayed, that can be done too, and I can explain the principle of how images get converted.

Customer:

I’m very interested in trying the function to send an image data stream to the device if it’s available.

We were also discussing the option of tweaking the default firmware and re-flashing the devices using Arduino-cli on each end-point where an Inkplate is connected, but our cybersec teams are likely to be unhappy about that. Is there a way to tweak the installed firmware from the factory to expose some Peripheral mode functions to change the default font etc.?

Soldered Support:

Please find attached the .zip file with the draw bitmap function along with documentation on how to convert the image. As this is a work in progress, it’s up to you to fully implement it, but I saw it working, so you just need to wrap the functionality in your existing sketch or peripheral mode if that’s what you want.

Maybe just using a sketch which only displays the image data from Serial and generating the picture on the computer (where it gets generated by a host app which sends the serial data to USB) will be sufficient and offer the least points of failure and make development go smoothly. It also offers you all the specific image creation controls which you can do on the computer app, which is probably way more than Inkplate.

As for flashing the firmware remotely, ESP32 does support OTA updates but we haven’t experimented much with that with Inkplate. If it’s going to be connected via USB - you can use Arduino-CLI and bundle it within your host app. You could use esptool.py and share the .bin file around as a firmware and have esptool.py do the firmware update. Maybe that’s an option.

Attachment omitted in migration: PeripheralModeNew.zip