A Stream Deck–style pad with a 4" touchscreen and volume knob in a 3D-printed case. A desktop app designs the pages and feeds the pad live data: now playing, per-app volume, PC stats and Discord.
Why the Esp32 S3 N16R8
Native USB: the S3 shows up as a USB keyboard and media keys and a serial link on one cable, with no driver and no USB-to-serial chip. The older ESP32 can't act as a USB device
8 MB PSRAM**:** a full 480×320 picture is about 300 KB in RGB565. The PSRAM holds a 4 MB cache of tile pictures and preloads the neighboring pages, so swiping doesn't stall.
16 MB flash**:** leaves room for a 9 MB file partition that stores every tile picture right on the pad.
Libraries and why
LVGL 8.4: a real UI toolkit (sliders, animations, layered menus) instead of drawing pixels by hand. Slide transitions and pop-ups would have been painful otherwise.
LovyanGFX: the screen and touch driver. Chosen over TFT_eSPI because it does fast DMA transfers over SPI and is set up in code, not by editing library header files.
ArduinoJson 7: reads the layout file the PC app sends.
PC side: Python with Pillow to render the tile faces, pycaw for per-app volume on Windows (pactl on Linux), and pywebview + pystray for the app window and tray icon.
Hurdles and edge cases
Frosted glass is too heavy for the S3 to draw live. I moved all the rendering to the PC: every tile face is pre-baked and dithered, and the pad just shows pictures. That's also what made full theme reskins possible.
Screen variants: some panels glitch at high SPI speeds, so display speed (40/60/80 MHz), rotation, colour inversion, r/B swap and touch calibration are all settings.
Apps fighting the volume: my music player resets its own volume on every song, so the app now watches each channel and puts the level back within half a second.
Old firmware vs a new app: an older pad refused a new file type and the connection kept dropping. Now the app checks the firmware version before sending it.
Status: built, printed and tested on real hardware, and everything works as planned.