Posts

Showing posts from November, 2024

Raspberry Pi Pico 2/MicroPython read bmp images and draw on ST7789 display pixel-by-pixel.

Image
Follow the former exercises of  Raspberry Pi Pico 2/MicroPython display on 1.54" 240x240 ST7789 SPI IPS and  Python code to read .bmp info from header (work on Desktop Python and MicroPython) , this exercise read bmp images, and draw on ST7789 display pixel-by-pixel. Exercise code: mpy_pico2_bmp.py """ Raspberry Pi Pico/MicroPython exercise to display on 1.54" IPS 240x240 with SPI ST7789 driver Pixel-by-Pixel Read, decode bmp in /images/ directory, and disply on 240x240 SPI ST7789 display. Target: - 240x240 RGB565 .bmp - 240x240 RGB888 .bmp ref: Using library: russhughes/st7789py_mpy https://github.com/russhughes/st7789py_mpy to install st7789py_mpy on Raspberry Pi Pico 2/MicroPython, https://coxxect.blogspot.com/2024/10/raspberry-pi-pico-2micropython-display.html to know more about bmp structure: https://coxxect.blogspot.com/2024/10/python-code-to-read-bmp-info-from.html to convert jpg to RGB565/RGB888 bmp using GIMP, read the