Custom firmware for the Waveshare ESP32-S3-LCD-1.47 development board with enhanced RGB LED control and WiFi connectivity.
- Board: Waveshare ESP32-S3-LCD-1.47
- Display: 1.47" 172x320 ST7789 LCD
- RGB LED: WS2812B (single LED, GRB color order)
- MCU: ESP32-S3 (Xtensa dual-core)
- Flash: 16MB
- PSRAM: 2MB
- ✅ Red Pulsing RGB LED - Smooth breathing effect (15ms update rate)
- ✅ WiFi Connectivity - Connects to configured network with auto-reconnect
- ✅ LVGL GUI - Demo UI with widgets on ST7789 LCD
- ✅ Bluetooth LE - Scans for nearby BLE devices
- ✅ SD Card Support - SDMMC interface (API updated for ESP-IDF v5.x)
- ✅ Fixed API Compatibility - Works with ESP-IDF v5.1.2
- ESP-IDF v5.1.2 or later
- Python 3.7+
- USB cable for flashing
- Git
git clone https://github.com/YOUR_USERNAME/waveshare-esp32-s3-lcd-1.47.git
cd waveshare-esp32-s3-lcd-1.47cd ESP32-S3-LCD-1.47-Demo/ESP-IDF/ESP32-S3-LCD-1.47-Test/main
cp wifi_config.h.example wifi_config.hEdit wifi_config.h with your WiFi credentials:
#define WIFI_SSID "YourWiFiSSID"
#define WIFI_PASSWORD "YourWiFiPassword"wifi_config.h is gitignored to protect your credentials!
Option A: Using ESP-IDF Installer (Recommended)
# Windows
C:\Users\YOUR_USER\esp\esp-idf\export.ps1
# Linux/Mac
. $HOME/esp/esp-idf/export.shOption B: Manual Installation Follow the ESP-IDF installation guide
cd ESP32-S3-LCD-1.47-Demo/ESP-IDF/ESP32-S3-LCD-1.47-Test
# Set target (first time only)
idf.py set-target esp32s3
# Build
idf.py build
# Flash and monitor (replace COM5 with your port)
idf.py -p COM5 flash monitorExit monitor: Press Ctrl+]
Problem: Stock code used RGB order, but WS2812B uses GRB natively.
Solution: Swapped color channels in main/RGB/RGB.c
// Now correctly outputs RED (not green)
led_strip_set_pixel(led_strip, 0, green_val, red_val, blue_val);Changed: From rainbow cycle → smooth red breathing effect
File: main/RGB/RGB.c
Added: Full WiFi station mode with event handlers
Features:
- Auto-connect on boot
- Auto-reconnect on disconnect
- IP address logging
- Connection timeout (10s)
File: main/Wireless/Wireless.c
// Old API (v4.x) - REMOVED
slot_config.clk = CONFIG_EXAMPLE_PIN_CLK;
slot_config.cmd = CONFIG_EXAMPLE_PIN_CMD;
// Pin config now handled automatically// Fixed: Use correct API for BLE scanning
esp_ble_gap_stop_scanning(); // Not esp_ble_dtm_stop()ESP32-S3-LCD-1.47-Demo/ESP-IDF/ESP32-S3-LCD-1.47-Test/
├── main/
│ ├── LCD_Driver/ # ST7789 display driver
│ ├── LVGL_Driver/ # LVGL integration
│ ├── LVGL_UI/ # UI examples
│ ├── RGB/ # WS2812B LED control (MODIFIED)
│ ├── SD_Card/ # SD card interface (FIXED for v5.x)
│ ├── Wireless/ # WiFi & BLE (ADDED WiFi connect)
│ ├── wifi_config.h # WiFi credentials (gitignored)
│ └── wifi_config.h.example # Template for WiFi config
├── components/
│ ├── espressif__led_strip/ # LED strip driver
│ └── lvgl__lvgl/ # LVGL library v8.3.11
├── CMakeLists.txt
├── partitions.csv
└── sdkconfig # ESP-IDF configuration
Could not open COM5, the port is busy
Solution: Kill zombie monitor processes
# Windows PowerShell
Get-Process | Where-Object { $_.Name -like "*python*" -and $_.CommandLine -like "*monitor*" } | Stop-Process -ForceCause: Using old SD card API
Solution: Already fixed in this repo! Update from stock firmware.
Cause: RGB vs GRB color order
Solution: Already fixed! WS2812B uses GRB natively.
- Check
main/wifi_config.hexists (copy from.example) - Verify SSID/password are correct
- Check router settings (2.4GHz, not hidden)
- Monitor serial output for error messages
- DEVLOG.md - Detailed development notes and learnings
- Waveshare Wiki - Official hardware documentation
- ESP-IDF Docs - Framework documentation
- ESP-IDF: v5.1.2
- LVGL: 8.3.11
- Target: ESP32-S3
- Flash Mode: DIO, 80MHz
- Flash Size: 16MB
- Partition: 3MB app, 4MB factory
Based on Waveshare demo code. Modifications licensed under MIT.
- Fork the repository
- Create your feature branch
- Don't commit
wifi_config.h! (It's gitignored) - Commit your changes
- Push to the branch
- Open a Pull Request
# Build only
idf.py build
# Flash only (faster for subsequent flashes)
idf.py -p COM5 flash
# Monitor only
idf.py -p COM5 monitor
# Clean build
idf.py clean
# Full clean (including sdkconfig)
idf.py fullclean
# Open configuration menu
idf.py menuconfig
# Check binary size
idf.py size- WS2812B uses GRB, not RGB! - Always check LED datasheet for color order
- ESP-IDF v5.x broke SD card API - Pin config now automatic
- Serial port locks persist - Kill zombie processes after crashes
- Target chip matters - ESP32 vs ESP32-S3 have different memory layouts
- WiFi credentials in code = bad - Always use config files + .gitignore
Built with ❤️ for the Waveshare ESP32-S3-LCD-1.47
Last Updated: 2025-11-12