Posts

Showing posts with the label Raspberry Pi Pico 2

Raspberry Pi Pico 2 W/CircuitPython 10.0.3: Load animated GIFs from MicroSD, display them on a 240*240 GC9A01 LCD using gifio.OnDiskGif.

Image
Previous posts show Basic setup of 1.28 inch 240x240 Round Display with GC9A01 SPI on Raspberry Pi Pico 2 W/CircuitPython 10.0.3  and display bmp images from SD using displayio.OnDiskBitmap()/adafruit_imageload.load()  This post shows how to display animated GIFs from MicroSD. The connection between Raspberry Pi Pico 2 W, GC9A01 LCD and the MicroSD Module refers to the last post, display bmp images from SD using displayio.OnDiskBitmap()/adafruit_imageload.load()   Ref: https://docs.circuitpython.org/en/latest/shared-bindings/gifio/index.html#gifio.OnDiskGif Exercise Code: cpy_rpPicoW_gc9a01_sd_OnDiskGif.py. Cooperate with displayio, this mode is relatively slow. """ Raspberry Pi Pico 2 W/CircuitPython 10.0.3 with 1.28" 240x240 Round GC9A01 SPI IPS LCD Display animated GIF in SD, using gifio.OnDiskGif. Cooperate with displayio, this mode is relatively slow. https://coxxect.blogspot.com/2026/02/raspberry-pi-pico-2-wcircuitpython-1003.html ref: https:...

Pico 2 W/CircuitPython 10.0.3 Display bmp images in SD, using displayio.OnDiskBitmap()/adafruit_imageload.load().

Image
Raspberry Pi Pico 2 W with CircuitPython 10.0.3, to display BMP images from an MicroSD card on a 240*240 GC9A01 Round LCD , using displayio.OnDiskBitmap() and adafruit_imageload.load(). Reference: -  displayio.OnDiskBitmap() -  adafruit_imageload.load() All bmp were resized and converted from jpg to 240*240 RGB888 bmp using FFmpeg . Connection: Raspberry Pi Pico 2 W ===================== GP28| GND | GP27| GP26| Run | GP22| ------- LCD_BLK ------------+ GND | | GP21| ------- LCD_DC ---------+ | GP20| ------- LCD_RES-------+ | | +------- SD_MISO|GP12 GP19| MOSI - SPI_SDA ----+ | | | | +----- SD_CS |GP13 GP18| SCK - SPI_SCL --+ | | | | | | |GND GND | | | | |...

Raspberry Pi Pico 2 W display on two 1.9" 170*320 ST7789 SPI LCD, using Arduino_GFX_Library, using separated SPI.

Image
Raspberry Pi Pico 2 W display on two 1.9" 170*320 ST7789 SPI LCD, using Arduino_GFX_Library, using separated SPI. In previous exercise, I used a Raspberry Pi Pico 2 W to drive two LCDs: a 2.4-inch and a 2.0-inch 240×320 ST7789 SPI IPS . Both displays shared a common SPI bus without any problems. However, when I replaced them with two 1.9-inch 170×320 ST7789 SPI LCDs , the setup did not work. Using the same code and connections, only the second LCD would turn on. To solve this, I separated the SPI connections for the two displays: the first one (on the left) is connected via Arduino_RPiPicoSPI, and the second one (on the right) is connected via Arduino_SWSPI. Updated connection: Raspberry Pi Pico 2 W      GP28| LCD2_RST -----------------+      GND | |      GP27| LCD2_DC ----------------+ |      GP26| LCD2_CS --------------+ | |      Run | ...

LVGL v9 exercise run on Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD (170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch).

Image
LVGL v9 exercise run on Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD (170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch) Basic setup and connection, refer to last exercise:  Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD, using Arduino_GFX_Library in Arduino Framework . To add LVGL function: - Install LVGL library in Arduino IDE Library Manager. - Go to lvgl library directory.   Copy lv_conf_template.h as lv_conf.h into the Arduino Libraries directory. - To enable the content of the file:     change the first #if 0 to #if 1 /* clang-format off */ #if 1 //0 /* Set this to "1" to enable content */ Exercise Code: rpPico2_ST7789_CST816_lvgl_button.ino , Create a button to control onboard LED. /* LVGL v9 exercise run on Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD (170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch). Create a button to control onboard LED. https://coxxect.blogspot.com/2025/12/lvgl-v9-exer...

Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD, using Arduino_GFX_Library in Arduino Framework.

Image
Raspberry Pi Pico 2 +  Waveshare 1.9inch Touch LCD (170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch) in Arduino Framework, interface with ST7789 using Arduino_GFX_Library (GFX Library for Arduino by Moon On Our Nation), and reading register from CST816 via I2C. Connection: Code: rpPico2_Arduino_GFX.ino , setup for Arduino_GFX_Library, color test. /* Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD, 170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch. Using Arduino_GFX_Library (GFX Library for Arduino by Moon On Our Nation) Details: https://coxxect.blogspot.com/2025/12/raspberry-pi-pico-2-waveshare-19inch.html Using board of Raspberry Pi Pico/RP2040/RP2350 by Earle F. Philhower III in Boards Manager. https://github.com/earlephilhower/arduino-pico Install Earle Philhower Raspberry Pi Pico Arduino core in Arduino IDE https://coxxect.blogspot.com/2023/08/install-earle-philhower-raspberry-pi.html */ /*********************...

LVGL on Raspberry Pi Pico 2 (Arduino framework/arduino-pico) with 320x480 TFT SPI ST7796 + FT6336U Capacitive Touch

Image
LVGL (Light and Versatile Graphics Library) is a popular free and open-source embedded graphics library to create beautiful UIs for any MCU, MPU and display type, supports working with the TFT_eSPI library. Following previous exercise " Raspberry Pi Pico 2 drive 4.0" 320x480 TFT SPI ST7796 with FT6336U Capacitive Touch + SD, in Arduino framework ", this exercise show steps to add LVGL on top of TFT_eSPI, on Raspberry Pi Pico 2. Install lvgl library in Arduino IDE's Library Manager. Using LVGL with Arduino requires some extra steps: Be sure to read the docs here: https://docs.lvgl.io/master/integration/framework/arduino.html Follow these configuration steps: - Go to the directory of the installed Arduino libraries - Go to lvgl and copy lv_conf_template.h as lv_conf.h into the Arduino Libraries directory next to the lvgl library folder. - Open lv_conf.h and change:   To enable the content of the file:   change the first #if 0 to #if 1   To use T...