I wanted a Stream Deck-style macro pad without paying for a Stream Deck, so I built one on a GUITION JC1060P470C. It is a 7-inch, 1024 x 600 capacitive touchscreen on an ESP32-P4. The project is called Tessera Deck. It is MIT licensed, it runs on Windows 10 and 11, and the panel UI is LVGL 9.6 on ESP-IDF 6.1.
This post covers the design choices behind the panel firmware and the host protocol, for anyone building something similar on an embedded display.
The cover image is a Blender render made from the CAD model of the desk console. I have no photo of a printed one yet. The panel screenshots below are not photos either: the native PC build of the real UI code drew them, and the agents screen uses sample data.
1. Build the UI for the PC first
The UI code compiles natively on the PC against the same LVGL sources as the firmware. A test feeds it touch input and renders 1024 x 600 frames.
A layout bug shows up in seconds, with no flashing and no cable. I can also make screenshots for the README without photographing a screen at an angle.
The catch is that the native build does not exercise the display driver, the touch controller or PSRAM limits. Those still need the board. I treat the native build as the place for UI logic and the board as the place for hardware surprises.
2. Keep the panel dumb
The panel only draws and reports touches. A small Python host on the PC owns the USB Serial/JTAG port, runs the actions and serves the editor on 127.0.0.1. The two talk over a line protocol at 115200 baud.
Each message is one UTF-8 line. The host sends text commands or one JSON object. The panel answers, and it also sends its own events as JSON lines. A key press looks like this, copied from the protocol page at v0.9.0:
{"type":"deck_event","id":N,"button":N,"label":"…","hold":true}
hold is only present for a long press. Everything else about what the key does lives on the PC. That means I can add an action without touching the firmware, and the firmware stays small.
There are limits to this design. The panel reads lines of up to 1,099 bytes and ignores a longer one, so the host sends a layout in 380-character chunks and an image in 160-byte chunks. A pressed key stays highlighted until the host answers, so without a host it flashes red at once. If the PC is off, the panel keeps the last layout on screen and the keys do nothing.
3. Update objects in place
A touchscreen punishes rebuilds. If a gauge value arrived and the grid were rebuilt while you press a key, your finger would be on a new object that never saw the press, so I update in place.
Now labels, colours and gauge values change on the existing LVGL objects. The grid is only rebuilt when the page or its layout changes. A key is never rebuilt under your finger.
The same idea covers widgets. The host sends a title, a second line and a progress value, and the panel draws every wide key the same way. A new widget is a new host-side feature and needs no new firmware.
4. Treat icons as a cache problem
Icons are the one thing that is too big to treat like text. The host sends each icon as RGBA with a CRC32 check, using these lines:
AD_IMG_BEGIN <id> <bytes> <crc32>
AD_IMG_DATA <offset> <hex>
AD_IMG_END
The panel only answers at the end: OK, INVALID or FULL. FULL means the cache cannot hold the image.
The cache is 8 MiB in PSRAM. When it needs room it drops the least recently used image that no key is showing. If the panel needs an image it no longer has, it sends {"type":"image","id":"im:…"} and the host sends it again. Animated icons arrive as frames with a duration each.
The CRC32 lets the panel answer INVALID for a corrupt image instead of showing it, and a corrupt icon is more annoying than a missing one.
5. Let the panel answer your AI agent
When Claude Code wants permission to run something, the question appears on the panel with Allow and Deny buttons. The agents screen also shows what Claude Code, Codex and ZCode are doing and in which project.
Setup adds hooks to ~/.claude/settings.json. It keeps your other hooks and makes a backup first. The hook waits up to 25 seconds for a touch. If the panel is off, nobody answers in time, or the request is too long to show, Claude Code falls back to its normal dialog. Tessera never allows anything on its own. If nothing answers, you answer at the keyboard as before, so the panel cannot block your work.
The screenshot below is drawn by the native PC build and uses sample data.
6. Plan the memory
The panel uses two partial draw buffers of 1024 x 240 pixels in PSRAM, one software draw unit and a 15 ms refresh period. The 6 x 3 key grid is placed by hand because the shape is fixed. Fonts are compressed. The icon cache takes its 8 MiB from the same PSRAM as the draw buffers.
What it does not do
- It runs on Windows 10 and 11 only. The host is Python and the actions are Windows actions.
- It supports one board. The pin setup and the screen layout are written for the JC1060P470C, so another board needs a port.
- There are no physical keys. You lose the feel of a real button.
- It is not code-signed. Windows SmartScreen may warn on first start. The release includes
SHA256SUMSso you can compare the zip before you run it. - The agents and mixer screenshots show sample data, and the console images are renders.
In the release the panel has no network and speaks only to the host over USB. The editor and the control API listen on 127.0.0.1 only.
Links
- Code and releases: github.com/catorendal-a11y/tessera-deck (v0.9.0)
- Website: catorendal-a11y.github.io/tessera-deck
I would like feedback on the in-place updates and the icon cache. If you want to port it to another ESP32-P4 display, CONTRIBUTING.md says what it takes.
This post was written by an AI agent (Claude Code) from the Tessera repo, and every fact in it was checked against the code. Tessera itself was also built with help from Claude Code.


Top comments (0)