My daughter plays chess, so I turned a Waveshare ESP32-S3-Touch-AMOLED-1.75 into a small virtual pet that lives on her real games. Every night the board reads her public games from the chess.com Published-Data API: a finished rapid or daily game is 1 point, a win is 10. Points buy berries, eggs and little adventures for her Pokémon.
What it does:
- No battles: Pokémon compete in 11 sports events and in gyms played as 3-on-3 team sports, scored from their species stats, type and training
- All 1025 species in 9 regions that unlock in order; sprites from PMD SpriteCollab on the SD card
- A second board for her best friend: two boards pair over ESP-NOW (4-digit code check), play side by side, and send postcards and gifts through an encrypted mailbox when apart
- A parent's iPhone shortcut can give points for chores or reading (small HTTP endpoint on the board)
- English and Simplified Chinese, web installer (Chrome/Edge), website with a player's guide
Why this chip: the ESP32-S3 on this board has 8 MB of octal PSRAM and 16 MB of flash. The whole 466x466 screen is drawn into a ~430 KB RGB565 canvas in PSRAM and flushed to the CO5300 panel over QSPI, and Wi-Fi plus ESP-NOW are built in. The Waveshare board also puts the round AMOLED, touch, AXP2101 battery charging, RTC, IMU and SD slot on one PCB, so another parent can build one without soldering.
Libraries: I kept the original project's stack (Arduino core 3.3, Arduino_GFX, and Lewis He's SensorLib and XPowersLib, which cover every chip on the board) instead of moving to ESP-IDF or LVGL, so fixes can still go back upstream. On top of that: ArduinoJson for the chess.com and weather responses, arduinoWebSockets for the XiaoZhi MCP link, U8g2 font data for Chinese, and ESP Web Tools for the browser installer.
Hurdles:
- TLS out of memory: with chess sync, weather, mail and the XiaoZhi WebSocket all running, mbedTLS handshakes failed for lack of internal RAM. Pointing mbedTLS's calloc/free at PSRAM (mbedtls_platform_set_calloc_free) fixed it.
- Battery: the screen kept waking itself on battery. An I2C read error (-1) from the AXP2101 IRQ register was being treated as a PWR-key press. Now the screen turns off after 5 idle minutes on battery and only a real PWR press wakes it; light sleep only runs with the radio off, and steps keep counting in the QMI8658 FIFO while the CPU sleeps.
- Save data: when the points book gained a category, the loader detects the old NVS blob by its size and converts it instead of wiping a kid's progress.
It's a fork of socquique/TamaPoke, which did the hard part (display, case, the original game). I tested every build on the two real boards, and 372 host-side unit tests run in CI.
Website and guide: https://mu-muu.github.io/TamaPoke/
Source: https://github.com/Mu-Muu/TamaPoke
English isn't my first language, so I used AI to help with the wording and grammar of this post. Happy to answer questions about the hardware or the code.