esp32-CYD
Project Information
Created
Updated
Description
Cycles the full screen of an ESP32-2432S028 (Cheap Yellow Display, ST7789 variant) through ten colors, one per second, using LovyanGFX with all pin configuration defined directly in the sketch.
Flash to Device
Login required: You need to login or create an account to flash this project.
Source Files (3)
Download AllREADME
ESP32 CYD Color Cycle Test
Full-screen color test for the Cheap Yellow Display using LovyanGFX
This sketch turns an ESP32-2432S028 (Sunton "Cheap Yellow Display") into a simple display tester.
After power-up, the whole screen cycles through 10 colors, one per second, in an endless loop.
It's a quick way to check that the panel, backlight and color order work correctly.
β Features
- Full-screen color cycle
- Red, green, blue, yellow, cyan, magenta, white, orange, purple, black
- 1-second interval, endless loop
- Self-contained configuration
- All pins and panel settings are defined in the sketch itself
- No need to edit any library files (unlike TFT_eSPI)
- Works the same in Arduino IDE and in cloud tools like FlashESP
- PWM backlight control at full brightness
π¦ Hardware requirements
- ESP32-2432S028 (Cheap Yellow Display, 2.8" 240x320)
- USB cable for programming
The sketch is configured for the ST7789 panel variant (usually the version with two USB ports: micro-USB + USB-C).
Pin configuration used in the code:
| Function | GPIO |
|---|---|
| SCLK | 14 |
| MOSI | 13 |
| MISO | 12 |
| DC | 2 |
| CS | 15 |
| Backlight | 21 |
π Library
LovyanGFX (by lovyan03).
π§ Troubleshooting
- Wrong colors (red β blue swapped): set
cfg.rgb_order = true. - Inverted colors (white shows as black): set
cfg.invert = true. - Shifted or garbled image: your board may use an ILI9341 panel instead. Replace
Panel_ST7789withPanel_ILI9341. - Upload fails with "Unable to verify flash chip connection": lower Tools β Upload Speed to 115200 or 460800.