Photo frame firmware for the ESP32 "Cheap Yellow Display" (CYD) 2.8", 3.5" and Freenove 4" boards: slideshow from an SD card, touch controls, on-screen WiFi setup, web page for photos and settings (English/Spanish), one-click web installer.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A photo frame for the ESP32 "Cheap Yellow Display" (CYD) — a ~$15 board with a 320×240 touch screen, SD card slot and speaker. Photos live on the SD card, and you manage everything from your phone or PC through a built-in web page. It also runs on the Freenove 4.0" ESP32-S3 display (see below).
Plug the frame into your computer with a USB cable, click a button, done — no software to install.
Use Chrome or Edge on a computer. Firefox, Safari and phones can't flash over USB.
Which button? It depends on the display panel in your board, not the number of USB ports. Start with button 1. If the screen stays white or the picture looks like a negative, nothing is damaged, just try another:
| Installer button | Build | Display |
|---|---|---|
| 1. CYD | cyd | ILI9341, normal colours: the standard CYD and many "2 USB" boards |
| 2. CYD2 | cyd2usb | ST7789 ("2 USB" boards with an ST7789 display) |
| 3. CYD2 alternate | cyd2b | ILI9341, inverted colours |
| 4. 3.5" CYD | cyd35 | ST7796 480×320: the 3.5-inch CYD (see below) |
| 5. Freenove 4" S3 | freenove4 | Freenove FNK0104S 4.0-inch ESP32-S3, ST7796 480×320, capacitive touch (see below) |
| 6. Freenove 2.8" S3 | freenove28 | Freenove FNK0104B/AB 2.8-inch ESP32-S3, ILI9341 320×240, capacitive touch (see below) |
| 7. 4.0" CYD | cyd40 | Freenove ESP32 Display 4.0-inch (plain ESP32, "FNK0103S" docs), ST7796 480×320, resistive touch; same pins as the 3.5" CYD. New in 4.7, lightly tested |
Only the colours off? You don't need another file: in the frame's web page, Settings, tick Swap red and blue or Invert colours.
Installing from the page replaces everything on the board, so you'll set up WiFi again. Photos on the SD card are not touched.
If your computer doesn't see the board, install the CH340 USB driver (links on the installer page).
Prefer to build it yourself? Install PlatformIO and run one of
pio run -e cyd -t upload # standard CYD (ILI9341)
pio run -e cyd2usb -t upload # CYD with 2 USB ports (ST7789)
pio run -e cyd2b -t upload # CYD "2B" variant (inverted colours)
pio run -e cyd35 -t upload # 3.5" CYD, ST7796 480x320 (see below)
pio run -e freenove4 -t upload # Freenove 4.0" ESP32-S3, ST7796 480x320 (see below)
pio run -e freenove28 -t upload # Freenove 2.8" ESP32-S3, ILI9341 320x240 (see below)
pio run -e cyd -t uploadfs # splash image + favicon (data/ folder), once
The cyd35 build is for the 3.5-inch CYD (ESP32-3248S035, ST7796 480×320, resistive touch). It differs from the 2.8" boards in two ways: the backlight is on GPIO27, and the touch controller shares the display's SPI pins, so touch is handled by TFT_eSPI (a bit-banged driver would take over the display's pins and freeze the screen).
platformio.ini; reports are welcome.The freenove4 build is for the Freenove FNK0104S 4.0-inch display board: ESP32-S3 with 16 MB flash and 8 MB PSRAM, ST7796 480×320 screen, capacitive touch, an SD card slot (4-bit SDMMC) and a speaker driven by an ES8311 audio codec. It has the same web page and photo handling as the CYD builds, with these differences:
ESP32_AP hotspot. On first start (or after holding BOOT while powering on) the frame lists the networks it can see: tap yours and type the password on the on-screen keyboard. It remembers several networks. This uses TouchWifiProvisioner.music.wav or music.mp3 as on the CYD. Uploads are checked by their real format, so an M4A renamed to .mp3 is refused with an explanation instead of playing silence.photoframe.local), so both can run on the same network./update works as on the CYD; upload CYD-PhotoFrame-freenove4-update.bin from a release.The freenove28 build is for the Freenove FNK0104B/AB 2.8-inch display board: the same ESP32-S3 (16 MB flash, 8 MB PSRAM), capacitive touch, SDMMC card slot and ES8311 audio codec as the 4.0-inch board, with an ILI9341 320×240 screen. It shares the code in 2-Freenove4/ and works like the 4.0-inch build (on-screen WiFi setup, capacitive touch, no calibration), with these differences:
CYD-PhotoFrame-freenove28-update.bin from a release on the /update page..jpg photos in the slot (or add them later from the web page).ESP32_AP hotspot any more.The frame keeps working without WiFi (it just shows the slideshow) and reconnects by itself when the network is back. To pick a different WiFi network later, hold the BOOT button while powering on. The frame remembers several networks and joins the strongest one it knows. A frame updated from 4.3 or older keeps its saved WiFi. If nobody touches a frame that has no WiFi saved for 3 minutes, it starts the slideshow without WiFi. To change the network without waiting for that, touch the middle of the picture to show the address screen and tap its WiFi button: the picker opens with no time limit and a Cancel row, and your saved networks stay.
| Action | Result |
|---|---|
| Touch left third | Previous photo |
| Touch right third (or BOOT button) | Next photo |
| Touch middle | Show IP address + QR code |
If left and right feel reversed on your board, uncomment TOUCH_FLIP_X in 1-Slideshow/app.h.
On the Freenove board touch is capacitive: use a finger, not a plastic stylus.
music.wav or music.mp3 and it plays (through the speaker) whenever you upload a photo, or on demand./update (ElegantOTA). Upload the firmware.bin from a release or from a CI build.There is no password on the web interface — keep the frame on a network you trust.
Screen rotation (a setting on the web page; the frame restarts when you change it): every board offers 0, 90, 180 and 270 degrees, so you can stand the frame up for portrait photos or put the USB port on any side. The CYDs ask you to touch the calibration targets the first time you use each orientation (every orientation keeps its own calibration); the Freenove needs no extra calibration. In the web page, the Resize option for uploads follows the frame's real size in the current rotation, so portrait photos are resized to fill a portrait screen.
.jpg / .jpeg, any case).Designed for the CYD ESP32-2432S028 family: ILI9341 (or ST7789) 320×240 display, XPT2046 touch, SD slot, speaker on GPIO26, backlight on GPIO21. The freenove4 build is for the Freenove FNK0104S 4.0-inch ESP32-S3 display board (see above).
You can buy the board on Amazon (under $20) — or search for "ESP32-2432S028" / "Cheap Yellow Display" on AliExpress (about $13, 2-week shipping).
Display ID: line: ID4=0x009341 means ILI9341 (use cyd, or cyd2b if colours are inverted); 0x008552 means ST7789 (use cyd2usb).freenove4 build, which is set to DIO).[email protected] (Arduino-ESP32 2.x). Newer platform releases use Arduino-ESP32 3.x, which this code doesn't support.platformio.ini pins the platform and all libraries. The code lives in 1-Slideshow/:
| File | Purpose |
|---|---|
1-Slideshow.cpp | setup / loop, touch (and its calibration), night mode |
wifi_setup.cpp | on-screen WiFi picker (TouchWifiProvisioner on LVGL) |
storage.cpp | SD card, photo list & playlist, uploads, deletes (one mutex guards all SD access) |
display.cpp | backlight, status screens, JPEG decode |
audio.cpp | WAV / MP3 playback |
web.cpp, web_assets.h | web server, JSON API, the single-page UI |
settings.cpp | settings saved in flash |
The Freenove build has its own folder, 2-Freenove4/, because its hardware differs from the CYDs: SD card over SDMMC instead of SPI, capacitive touch (touch.cpp), an I2S audio codec (audio.cpp, es8311.*), PSRAM-backed photo scaling (display.cpp) and an on-device WiFi picker (wifi_setup.cpp). The web server, web page and settings files are copies of the CYD ones. Its partition table is 2-Freenove4/partitions.csv (two OTA app slots and a small SPIFFS), and flash mode must stay DIO: with QIO the ROM bootloader hangs and the board reboots every few seconds.
GitHub Actions builds every board on every push and keeps the .bin files as artifacts.
Created by Grey Lancaster with help from ChatGPT, Claude and the open-source community. Built on TouchWifiProvisioner, LVGL, ESPAsyncWebServer, TFT_eSPI, SdFat, JPEGDEC, QRCode, ESP8266Audio and ElegantOTA — thank you to their authors.
The Freenove build also uses the FT6336U library and Espressif's ES8311 driver.
Un marco de fotos para el ESP32 "Cheap Yellow Display" (CYD), una placa de unos 15 $ con pantalla táctil de 320×240, ranura para tarjeta SD y altavoz. Las fotos están en la tarjeta SD y todo se gestiona desde el móvil o el PC con una página web integrada, que también está en español. Funciona además con la pantalla Freenove de 4,0" con ESP32-S3.
Conecta el marco al ordenador con un cable USB, pulsa un botón y listo: no hay que instalar nada.
Usa Chrome o Edge en un ordenador. Firefox, Safari y los móviles no pueden grabar por USB.
¿Qué botón? Depende del panel de la pantalla de tu placa, no del número de puertos USB. Empieza por el botón 1. Si la pantalla se queda en blanco o la imagen parece un negativo, no se ha estropeado nada: prueba otro.
| Botón del instalador | Versión | Pantalla |
|---|---|---|
| 1. CYD | cyd | ILI9341, colores normales: el CYD estándar y muchas placas "2 USB" |
| 2. CYD2 | cyd2usb | ST7789 (placas "2 USB" con pantalla ST7789) |
| 3. CYD2 alternativo | cyd2b | ILI9341, colores invertidos |
| 4. CYD de 3,5" | cyd35 | ST7796 480×320: el CYD de 3,5 pulgadas |
| 5. Freenove 4" S3 | freenove4 | Freenove FNK0104S de 4,0 pulgadas con ESP32-S3, ST7796 480×320, táctil capacitivo |
| 6. Freenove 2.8" S3 | freenove28 | Freenove FNK0104B/AB de 2,8 pulgadas con ESP32-S3, ILI9341 320×240, táctil capacitivo |
| 7. CYD de 4,0" | cyd40 | Freenove ESP32 Display de 4,0 pulgadas (ESP32 normal), ST7796 480×320, táctil resistivo; mismos pines que el CYD de 3,5". Nuevo en 4.7, poco probado |
¿Solo fallan los colores? No hace falta otro archivo: en la página web del marco, en Ajustes, marca Intercambiar rojo y azul o Invertir colores.
Instalar desde la página reemplaza todo lo de la placa, así que tendrás que configurar de nuevo el WiFi. Las fotos de la tarjeta SD no se tocan.
Si el ordenador no reconoce la placa, instala el controlador USB CH340 (hay enlaces en la página del instalador).
.jpg (o añádelas después desde la página web).ESP32_AP.El marco sigue funcionando sin WiFi (solo muestra las fotos) y se reconecta solo cuando vuelve la red. Para elegir otra red WiFi más adelante, mantén pulsado el botón BOOT al encenderlo. El marco recuerda varias redes y se une a la más fuerte que conoce. Un marco actualizado desde la 4.3 o anterior conserva su WiFi. Si nadie toca un marco sin WiFi guardado durante 3 minutos, empieza la presentación sin WiFi. Para cambiar de red sin esperar, toca el centro de la imagen para ver la pantalla de la dirección y pulsa su botón WiFi: el selector se abre sin límite de tiempo y con una fila Cancelar, y las redes guardadas se conservan.
| Acción | Resultado |
|---|---|
| Tocar el tercio izquierdo | Foto anterior |
| Tocar el tercio derecho (o botón BOOT) | Foto siguiente |
| Tocar el centro | Muestra la dirección IP y el código QR |
music.wav o music.mp3 y suena (por el altavoz) al subir una foto o cuando quieras./update. Sube el firmware.bin de una versión publicada.No hay contraseña en la página web: conecta el marco solo a una red de confianza.
Más detalles técnicos (compilar desde el código, el desarrollo) en la parte inglesa de arriba.
Creado por Grey Lancaster con ayuda de ChatGPT, Claude y la comunidad de código abierto. Gracias a los autores de TouchWifiProvisioner, LVGL, ESPAsyncWebServer, TFT_eSPI, SdFat, JPEGDEC, QRCode, ESP8266Audio y ElegantOTA. Licencia MIT.
La traducción al español es nueva; se agradecen las correcciones.