This repository contains CircuitPython code for playing GIF animations on the Hiletgo 2.2" ILI9341 SPI display using the Waveshare RP2040-Plus board.
Connect the display to the RP2040-Plus using the following pins (adjust as needed):
| Display Pin | RP2040-Plus Pin |
|---|---|
| VCC | 3V3 |
| GND | GND |
| SCK | GP18 |
| MOSI | GP19 |
| MISO | GP16 (unused) |
| CS | GP17 |
| DC | GP20 |
| RESET | GP21 |
| LED | 3V3 |
- Download the Adafruit CircuitPython library bundle corresponding to your CircuitPython version.
- Copy the following libraries from the bundle into the
libdirectory on the CIRCUITPY drive:adafruit_ili9341.mpyadafruit_gifio.mpyadafruit_imageload.mpyadafruit_bus_device
- Copy
code.pyfrom this repository to the root of the CIRCUITPY drive. - Create a
gifsdirectory on the CIRCUITPY drive and place your GIF file there nameddemo.gif(or update the path incode.py). - Eject the drive. The board will automatically run
code.pyand display the GIF.
The display orientation and pin assignments can be changed in code.py if your wiring differs. Large GIF files may require more memory than available on the board.