ESP32 Projects
Start a build
Markdown

ESP32 Touch for ESP32-S3

An ESP32 display project for ESP32-S3 involving Touchscreen.

ESP32-S3ESP-IDFUnrated
Parts and source

Before you start

Check the exact Touchscreen configuration against the upstream wiring or parts list.

Upstream README

ESP32 Touch Dashboard & Toolbox

ESP-IDF build Host tests License: MIT

中文说明 · Documentation · Changelog

📖 Author's blog: ESP32 Touch Monitor: PC Telemetry, Window Streaming, and Local Tools

A 320×240 touchscreen dashboard with live PC monitoring, local Codex / Claude Code token statistics and estimated CNY costs, selected PC window sharing with touch control, plus games, system utilities, inventory management and an offline vocabulary lab. A small Windows companion application installs per user, starts after login and waits for the USB device automatically.

Hardware target: esp32, ESP-IDF 5.5.4, LVGL 8.4. The repository name is historical: the validated device reports ESP32-D0WD-V3, not ESP32-S3. Keep the target, pin map and display orientation for this board. Other boards need porting.

Features

Area Current behavior
Home Date, weekday, Wi-Fi status, clock; CPU/GPU/RAM rings, temperatures and RAM usage. Home stays visible when idle.
AI usage Tap CODEX / CLAUDE on the device to switch independent daily usage; selection survives reboot. Model names scroll above the combined CNY cost; tokens and cost sum all models of that provider. EXE selection remains a fallback. No daily goal. Refreshes about every 5 seconds.
GAME Sudoku, 2048, Flappy, Snake and Breakout; pause/resume and restart controls.
SYSTEM PC SCREEN, SD check, system info, Wi-Fi, confirmed touch calibration and PC details.
OTHER Salary Cat, SD-backed inventory/BOM and Vocab Lab with local wordbooks, study plans, spaced review and touchscreen dictation.
Windows companion Dark desktop GUI with Device, PC SCREEN, AI Usage and Settings/Logs pages; searchable window selection, COM checks, CH340 diagnostics/installation, login startup and pause/resume.

PC telemetry requires the companion to run. Games and local utilities remain usable independently. GPU data depends on a supported NVIDIA driver; CPU temperature is best effort. Unavailable sensors display --. PC data expires after 5 seconds, Codex data after 90 seconds.

Codex usage comes from locally retained session logs. It is not a server billing or subscription quota API. Prices are user-supplied configuration, with an editable default USD/CNY rate of 7.20. AI usage packets contain only aggregate counts, cost and model identifiers, without prompts or credentials. Enabling PC SCREEN also transmits pixels from the selected window, which may contain private information.

2026-11-01: model costs and device sync

Companion 2026.11.01.2 and matching full firmware are available in the download directory. The AI Usage page lists today's models, input/cache/output tokens, context tiers, individual estimates and a combined total. Eight GPT models use the user's confirmed 20% of screenshot standard rates; custom rates and FX are preserved, and Claude stays separate. The device scrolls daily model names above the selected provider's total. Update both the companion and firmware. These are local usage estimates, not active-session lists or official bills.

Device: model names and total Desktop: per-model usage and costs
Device model names Desktop model usage

Both previews use synthetic data: the device view is rendered from the actual LVGL page, and the desktop view is a real GUI test window. See pricing and validation for assumptions and tested scope.

Device screens

Home: PC monitoring and AI usage GAME: five offline games
Home dashboard GAME menu
SYSTEM: device and connection tools OTHER: salary, inventory and vocabulary
SYSTEM menu OTHER menu

Tap a category at the bottom of Home to open it; BACK returns from a tool to its category and from a category to Home. Tap CODEX / CLAUDE on the device to select independent usage. Salary Cat is under OTHER → SALARY CAT. The illustrated device guide (Chinese) explains entry points, game controls and tool requirements, including PC SCREEN.

These are 320×240 screenshots rendered offscreen from the actual current LVGL page code with fixed sample data, not device photos. See image provenance for capture scope. They illustrate the source; published binary versions are listed separately in the download guide.

Salary Cat

The 2026-10-20 source adds Salary Cat under OTHER → SALARY CAT: a monochrome dashboard with transparent animated weekday cats, scheduled earnings, work-time/countdown, on-device salary/shift/workday settings, manual date overrides, a 2026 China holiday calendar and optional boot page. Tap the amount to cycle daily, monthly and annual estimates. October 2026 has 18 workdays, including the Saturday makeup workday on October 10; October 1–7 are holidays. The 2026-10-21 update adds separate Saturday and Sunday animations and a special cat for nationally designated weekend makeup workdays. Personal rest overrides the calendar; the device owner confirmed normal display and continuous animation. It estimates scheduled time, requires a valid clock and does not record attendance. See the download/validation documents for published binary versions and tested scope.

Salary Cat animated dashboard

The image above captures the actual LVGL page rendered offscreen at 320×240 using sample data (CNY 6,000/month, 09:00–12:00 and 14:00–17:00). It is not a device photo. Screenshots and controls cover earnings, settings, date overrides and makeup workdays; image provenance explains the capture method.

Windows quick start

  1. Download ESP32TouchDashboard.exe or build it using the instructions below. The published Windows x64 EXE is also available in dist/, with a SHA-256 checksum.
  2. Connect the device. Install its USB serial driver if Windows does not expose a COM port; the tested board uses CH340.
  3. Double-click the EXE to open the desktop GUI. Select a port on the Device page and choose connect/resume. Python is not required.
  4. For per-user installation and a Start menu shortcut, run ESP32TouchDashboard.exe --install. Installation uses the current runtime directory and enables login startup. A first run from a non-C drive uses .dashboard beside the EXE by default; see the user guide for directory selection rules.

See the Windows user guide for migration, updates, removal and troubleshooting. Pause monitoring before flashing or using another serial tool.

The PC SCREEN firmware package and flashing instructions provide the full system upgrade for the tested ESP32 board, including PC SCREEN and games.

PC SCREEN and game upgrade — 2026-10-18

Use companion 2026.11.01.2 with the updated firmware. In the GUI's PC SCREEN page, search by window title/process and double-click a window or select share. On the device, open SYSTEM → PC SCREEN. Select another window in the GUI to switch without reopening the serial port; stop sharing clears the target.

Tap a point, then cycle 2X → 4X → 8X → FIT to zoom around the last touched position. A tap also sends a left click. Drag while zoomed to pan; UP / DN scroll the target, including ChatGPT. Selecting NetEase Cloud Music (cloudmusic.exe) shows PREV / PLAY / NEXT / VOL- / VOL+ controls. Version .4 fixes capture stopping at Switching window... after the GUI exits; the background continues running when the GUI closes.

The wire frame is 320×176 RGB332; the ESP32 uses a 256×140 indexed cache to fit available RAM. Small text in a full window still needs zoom. The 115200-baud link is for low-rate viewing/control. Minimized/GPU windows and background input depend on each app; run the target and Dashboard at matching, ordinary privileges.

Snake and Breakout join Sudoku, 2048 and Flappy. Games have II / GO pause/resume and NEW restart (new puzzle in Sudoku). 2048 supports swipes, Sudoku has a larger keypad/highlights, and Flappy has updated visuals/status. See the device guide and validation record for controls and tested limits.

Build from source

Firmware, in an ESP-IDF 5.5.4 environment:

idf.py set-target esp32
idf.py build
idf.py -p COM5 flash

Use the port assigned to your device; COM5 is only an example. For an existing configured build, keep its configuration rather than resetting the target.

Windows EXE, with Python 3.11 x64 and PowerShell:

powershell -NoProfile -ExecutionPolicy Bypass -File .\build_exe.ps1

Output: dist/ESP32TouchDashboard.exe. The script creates an isolated packaging environment and pins pyserial/PyInstaller to the validated versions. Full instructions and manual hardware tests are in the developer guide.

For a source-only host run (Windows or the existing Linux monitoring path):

python -m pip install -r tools/requirements.txt
python tools/pc_monitor_host.py --port COM5 --codex-prices tools/codex_prices.json

The installer, background supervisor, desktop GUI and window capture are Windows only.

Repository layout

main/                  ESP-IDF firmware, LVGL UI, drivers and tools
tools/                 Host sender, Codex reader, Windows app and tests
docs/                  Functionality, app guide, architecture, protocol, roadmap
sdcard_template/       Public starter inventory/BOM and vocabulary examples
.github/workflows/     Firmware CI, host tests, manual Windows packaging
build_exe.ps1          Build the standalone Windows EXE
start_dashboard.ps1    Install if needed, select AI source and resume
stop_dashboard.ps1     Pause monitoring and release the serial port

Git contains source, generic configuration, documentation and the explicitly published Windows companion EXE, PC SCREEN full firmware ZIP and checksums. Other generated firmware/EXEs, build environments, recovery images and local runtime data are excluded. The manual Windows workflow produces a downloadable Actions artifact; it does not automatically publish a GitHub Release.

Documentation and contribution

MIT license: LICENSE. Component and wordbook notices: third-party notices. Personal inventory, Codex logs, flash backups and account data must remain local.