A ESP32-based GIF display that creates a WiFi access point for uploading and displaying GIF animations on LCD screens. Originally designed for the ESP32-S3-LCD-2 Waveshare board but configurable for other ESP32 boards with SPI LCD displays.
- ESP32 board (Configured for the ESP32-S3-LCD-2 by default)
- SPI LCD display (240x320 resolution by default)
This project should work with any ESP32 board, but you'll need to:
- Configure pin assignments in
config.h
to match your board's LCD connections - Enable PSRAM (Required due to the use of
GIFPlayer.h
from AnimatedGIF)
- ESP32-S3-LCD-2 Waveshare (tested, pin configuration included)
- ESP32-S3 with SPI LCD breakout (PSRAM required)
- ESP32 with SPI LCD breakout (PSRAM required)
Important: Only ESP32 boards with PSRAM support will work with this project.
REQUIRED: PSRAM is mandatory for this project. The GIFPlayer.h
library from AnimatedGIF requires PSRAM memory allocation (3 × width × height bytes) and will not work without it.
In Arduino IDE:
- Select your ESP32 board variant
- Set PSRAM to "OPI PSRAM" (this is what works with ESP32-S3-LCD-2)
- Leave other settings as default unless you encounter issues
Note: This project will not function on boards without PSRAM support due to the memory requirements of the GIF player.
Install these libraries through Arduino IDE Library Manager:
- bb_spi_lcd - For LCD display control
- AnimatedGIF - For GIF decoding and playback
There's a known issue with the AnimatedGIF library: the GIFPlayer.h
header file is not included in the standard library installation. You'll need to manually add it:
- Download
GIFPlayer.h
from the AnimatedGIF GitHub repository - Place it in your Arduino libraries folder alongside
AnimatedGIF.h
andAnimatedGIF.cpp
- The file should be located at:
Arduino/libraries/AnimatedGIF/src/GIFPlayer.h
- Web-based GIF Upload: Upload GIFs through a simple web interface
- Orientation Control: Switch between portrait (240x320) and landscape (320x240) display modes
- Real-time Status: Live upload status and progress indicators
- Persistent Settings: Display orientation settings are saved and restored on reboot
- Hot-swappable GIFs: Upload new GIFs without interrupting playback
- Install Required Libraries (see Library Installation Quirk above)
- Install LittleFS Uploader Plugin: Download and install the LittleFS Uploader Plugin for Arduino IDE
- Configure Arduino IDE:
- Select your ESP32 board variant
- Set PSRAM to "OPI PSRAM"
- Configure Pin Assignments: Update
config.h
to match your board's LCD connections - Upload the Code to your ESP32 board
- Upload LittleFS Data:
- Press Ctrl+Shift+P to open the command palette
- Type "LittleFS" and select "Upload LittleFS to Pico/ESP8266/ESP32"
- This uploads the
data/
directory containing the web interface HTML file
- Connect to WiFi: The ESP32 will create an access point named "ESP32-GIF" (password: "upload123")
- Open Web Interface: Navigate to
http://192.168.4.1
in your browser
- Set Display Orientation: Choose between Portrait or Landscape mode
- Upload GIF: Select a GIF file and click "Upload & Switch"
- Enjoy: Your GIF will start playing immediately on the LCD
- Display Resolution: 240x320 pixels
- Supported Format: GIF animations
- Storage: Uses LittleFS filesystem
- WiFi: Creates access point for easy configuration
- Memory: Requires PSRAM for GIF decoding (3 × width × height bytes)
esp32-gif-display/
├── esp32-gif-display.ino # Main Arduino sketch
├── config.h # Pin definitions and configuration
├── data/
│ └── index.html # Web interface
└── src/
├── display/ # LCD display control
├── gif_player/ # GIF playback logic
└── webui/ # Web server and upload handling
- GIF not displaying: Ensure PSRAM is enabled in board settings (required)
- Compilation errors: Verify your ESP32 board supports PSRAM
- Upload fails: Check that GIF file is valid and not too large
- Display issues: Verify pin connections match
config.h
definitions - Library errors: Ensure
GIFPlayer.h
is manually added to AnimatedGIF library
The project uses configurable pin assignments defined in config.h
. Default configuration for ESP32-S3-LCD-2 Waveshare:
- LCD_SCLK: GPIO 39
- LCD_MOSI: GPIO 38
- LCD_MISO: GPIO 40
- LCD_DC: GPIO 42
- LCD_RST: GPIO 0
- LCD_CS: GPIO 45
- LCD_BL: GPIO 1 (backlight control)
For other boards: Modify the pin definitions in config.h
to match your specific LCD connections.
This project is licensed under the MIT License. See the LICENSE file for details.