M5StickC: Cannot write BMP/JPG/RAW to the lcd from memory
-
Hi. I'm using the last version of firmware (1.6.0), and there is so many differences between it and micropython code samples from 2018-2019. I wanna print the image, loaded from my local server. I wanna write raw bmp array right to the screen like here: https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/blob/fede6f610c9952c7242fc309c2bb4efc9afb0919/MicroPython_BUILD/components/micropython/esp32/modules/ssd1306.py
There are any solutions for writing, except for pixel-by-pixel?)
-
@reganel Images have to be formatted and saved in a very specific way to be used. this is a limitation of Micropython.
The exact specifications required are written down in several post o this forum. please use the search function to find those requirements. -
@reganel You could save the image to a file and load it back to the display, but with frequent writing to the flash memory, you will damage it very quickly. I tried to load a bitmap into a variable and draw from it pixel by pixel on the screen, but esp does not have enough ram memory (for a 24 bit 80x160 bitmap some 38kB). From what I've seen, the C libraries for arduino allow you to write an image from a buffer. The only thing I was able to get is reading a jpg image through mqtt (size about 10kB), saving to a file and from a file to the screen. But as mentioned before, flash memory has a limited number of write cycles.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login