ToolingProjects

TanPlanet Live — an ESP32 desk display

A personal ESP32 desk screen that replaced opening six apps every morning with a glance at the screen next to the keyboard — one ฿640 board and a Node backend running on the Mac I already had. No cloud, no keys on the board, and the data never leaves the house.

12 min read

A ฿640 3.5" screen on my desk that pulls the Thai calendar, lunar phase, weather, investing horoscope, stock portfolio, AI quota and Claude Code status into tappable cards. The ESP32 is only the "screen"; the brain lives on the Mac.

ESP32LVGL 9TFT_eSPIXPT2046 TouchNode BackendlaunchdmDNSCustom Thai font
Empathize · Define

The problem

There are only a few things I check every morning, but they live in different places and none of them is ever "right in front of me"

A phone screen full of app icons and notification badges
Information I look at for a few seconds, yet I have to unlock the phone and open one app after another · Photo: Brian J. Tromp / Unsplash

Every morning I opened six things: the calendar for Buddhist holy days, a weather app, my portfolio in Dime, the coach card in LINE, how much Claude quota was left, and what the agents I had started were doing. All of it is "glance" information, not something worth opening an app to read. On the computer it was always buried under other windows.

— The starting brief, before ordering the ESP32 board

Data spread across 6 apps, 3 seconds each

Weather, holy days, watched stock prices, AI quota: less than a minute of reading in total, but it meant unlocking the phone, opening apps and switching tabs every day

A dashboard on the computer doesn't really exist

A dashboard in another tab always ends up under work windows. Glanceable information needs its own space that doesn't compete with work.

Off-the-shelf screen modules can't speak Thai

Almost every ready-made ESP32 screen firmware ships only Latin fonts. Thai comes out as boxes, and tone marks stack in the wrong place.

The ESP32 can't do the thinking

Calculating the solar-calendar horoscope, calling AI for summaries, reading the OAuth quota: these eat RAM and need secrets that shouldn't be baked into a board sitting on a desk

New Wi-Fi network, new flash

Firmware with the backend IP hardcoded dies silently when the Mac gets a new IP or the router changes, and has to be re-flashed over USB every time


Ideate

The solution

Draw a clear line between the "screen" and the "brain", and let them talk through one data contract

The ESP32 is a thin client, not the brain

The backend on the Mac gathers every source, does the calculations, and sends short card JSON for the screen to draw. The firmware doesn't know any API and holds no keys.

Everything is a "card" with the same shape

Weather, stocks, horoscope or AI quota, every card uses the same contract id / type / title / value / detail / tone / priority. A new card = one new function in the backend, no change to the screen.

Configure from the phone, no flashing

The /manage page reorders cards, hides or shows them, picks watched stocks, sets the Pomodoro timer and day/night brightness. The screen pulls the config on its next cycle and updates right away.

A self-generated Thai font with raised tone marks

I built bitmap fonts from Anuphan in 5 sizes for the firmware, and made raised tone-mark glyphs stored in the Private Use Area, because LVGL doesn't read OpenType GPOS tables

Find the backend by name, not IP

The screen resolves Workspace-3.local via mDNS and caches the IP. Moving the router, switching Wi-Fi bands or a new Mac IP: it still finds the backend without a cable.

The /manage page on mobile: the list of cards in screen order, with up/down buttons and a hide button for each card The /manage focus and reminders section: Pomodoro minutes, break length, water reminders and the screen's refresh interval
The /manage page opened on a phone — reorder cards, hide cards, set Pomodoro and brightness, and the screen follows on its next cycle (screenshots from the real device, personal data replaced with sample values)

Prototype

How it works — 4 steps

From raw data sources to tappable cards on the screen, in a 60-second cycle

A terminal showing JSON for the weather and investing horoscope cards, with fields id type title value detail tone priority
What the screen receives is pre-digested cards — short text, numbers and a tone for picking colors (sample file following the data contract in the repo)
1

Gather

The backend pulls weather, the .ics calendar, stock prices, horoscope, Claude quota and the tail of the agent session files

2

Digest into cards

Everything is computed on the Mac, leaving only short text + numbers the screen can draw immediately

3

The screen pulls and draws

The ESP32 makes an HTTP request every 60 s (the Claude card has its own 10 s channel) and renders with LVGL

4

Tap to drill in

Tap a card → a detail page: price chart, hourly rain chart, month calendar or price ladder


Prototype

Tech Stack & Architecture

No cloud, no user accounts, no keys on the board — everything stays on the home LAN

An ESP32 development board on graph paper
The ESP32 only fetches JSON and draws it — the brain is on the Mac · Photo: Thorium / Unsplash
Data sources
Open-Meteo MegaCoach JSON Thai Astrology API Claude usage API ~/.claude/projects/*.jsonl .ics calendar
↕
Node backend on the Mac (launchd) — port 8787
/api/device-summary /api/claude /manage saju.mjs thai-lunar.mjs
↕
Firmware (Arduino + LVGL 9)
mDNS resolve HTTP poll Thai font, 5 sizes touch + scroll auto-dim
↕
ESP32-035 — ฿640
ST7796 320×480 XPT2046 resistive LDR RGB LED audio amp Flash 4MB
Why this stack?

ESP32-035 has the screen, touch, LDR, RGB LED and audio amp on one ฿640 board, so no extra sensors at all · LVGL 9 gives production-grade scroll, touch and animation on an MCU · The backend is plain Node with no dependencies, run by launchd so it starts with the machine · Keeping it on the LAN means it can read local files (agent sessions, portfolio data) without uploading anything to the cloud


Prototype

What I built — 12 cards

Every card shows real data; no mocks are left on the screen

An orange pixel mascot in 6 poses: holding a magnifier while reading files, typing on a laptop while editing, wearing a hard hat with a hammer while running commands, holding a globe while searching the web, a speech bubble while thinking, and asleep
The mascot in the Claude Code card changes pose based on the tool the agent is using — rendered from the same code as the firmware (tamaclaude, MIT)

Clock + Thai date

NTP sync, drawn with a separate 48px numeral font, plus the full Buddhist Era date in the header bar

Monthly calendar

Scroll to other months · blue dot under holy days · red numbers for public holidays · can pull external calendars via .ics

Lunar calendar / holy days

Waxing and waning phases are calculated in the backend with the Thai solar-calendar formula, no external API

Weather, Google Weather style

Open-Meteo + a hand-drawn hourly rain-chance chart + Google-style icons embedded as RGB565A8 C arrays

Today's investing horoscope

Connected to the Thai Astrology engine from the MegaCoach project — a 0-100 score with a short explanation

Today's energy (Saju)

I wrote the engine myself in saju.mjs and checked it against a reference app for every time period — energy per period shown as a connected line chart

Market Focus

Watched stock prices with a 1-month chart; press ◄ ► to page through them, list chosen on the manage page

Monthly Plan & Price Ladder

Shows the entry zone / stop / target against the current price as a ladder, so you see at once where you are in the plan

North Star

Long-term goals and the risk rule Fear of Ruin > FOMO that I need to see every day

AI Status

Claude quota for the 5-hour and 7-day windows as line bars with a pace marker — the color changes when % used runs ahead of time elapsed

Claude Code + mascot

Reads the tail of the session file to see which tool the agent is using, and the mascot acts it out. Refreshes every 10 seconds.

Pomodoro + routine reminders

Work/break timer plus reminders for water, lunch and end of day — tap while it blinks to dismiss in one move


Prototype

On the screen

320×480 portrait — a fixed header bar, with scrollable, tappable cards below

09:42
Tue 5 August 2026
31°
Mostly cloudy
Waxing moon, 12th night, 9th month
CLAUDE CODE
Editing a file
live-arduino · app_main.cpp
AI STATUS
5-hour window 62%
MARKET FOCUS
NVDA $206.69 ▲ 1.2%
1 month · low $188 · high $212
Today's energy
Fire element · 71/100
Strong period 09:00-11:00
Pomodoro
18:24
Working · water reminder in 12 min

The header bar never moves during the day, so time and weather can be "glanced" without focusing. The cards below follow the priority set from the phone.


Test & Iterate

Hacks and problems

7 problems that came up once the real thing was on the desk — most aren't in any documentation and had to be tracked down by hand

Tweezers placing a small chip onto a green circuit board
Most of the problems aren't documented and had to be traced from symptoms on the real board · Photo: Vishnu Mohanan / Unsplash

Freezes on tap, with 165KB of free heap

Tapping a card froze the screen now and then. I assumed RAM ran out, but the ESP reported 165KB of free heap.

Fix: LVGL doesn't use the system heap. It uses its own pool, LV_MEM_SIZE = 32KB, which was 89% full → switched to LV_STDLIB_CLIB so LVGL allocates from the real heap — lesson: on an MCU, ask "which memory block is full", not just "how much is free"

The board reboots when opening a detail page

Opening the mascot card's detail page rebooted the board instantly, even with 163KB of heap to spare

Fix: a 1.7KB mascot image struct was declared as a local variable in the draw callback, so it lived on the task's stack, not the heap → made it static — lesson: a stack overflow on the ESP32 looks like "it just rebooted", with no error to read

Thai tone marks stacked in the wrong place

Words with an upper vowel plus a tone mark, such as "ที่", collided into a blob, because LVGL doesn't read OpenType GPOS tables

Fix: wrote make_thai_font.py to generate bitmap fonts in 5 sizes from Anuphan, and created raised tone-mark glyphs stored in the Private Use Area. At render time, characters are mapped to the PUA glyphs when the context needs raising — correct placement without a shaping engine

Boxes on the screen weren't a loading state

Clock digits showed up as boxes in some states — I spent a long time hunting a data-loading race condition

Fix: they were glyphs missing from the font. The 48px clock font only has 0-9 : °, so sending --:-- turned the dashes into boxes → now an empty string is sent until the time is known — lesson: boxes = font, not state

No data on screen, but the backend wasn't down

The screen showed an error while curl from the Mac returned a normal 200 — I lost a lot of time looking for the cause on the backend

Fix: the firmware never called MDNS.begin(), so lwip couldn't resolve .local names → use MDNS.queryHost() to get the IP and cache it — the trap that misled me: curling the .local name from the Mac itself goes to 127.0.0.1; you have to curl the LAN IP to see the truth

Long weather names overlapped the clock

Even with LV_LABEL_LONG_DOT it still overlapped, because LVGL wraps to a second line first and only then adds the ellipsis

Fix: wrote setThaiTextFit(), which measures the real width with lv_text_get_size and trims the text one UTF-8 character at a time until it fits — never trim byte by byte, or you cut a Thai character in half and get garbage

The Claude card was 5 minutes late

The card that shows what the agent is doing has to be live, but it waited for the main 60-second/5-minute cycle, so it was always stale

Fix: a separate /api/claude channel sends only that one card (~300 bytes) every 10 s, and overwrites the existing labels in place by keeping their pointers, instead of lv_obj_clean on the whole screen — clearing the screen would snap the scroll back to the top every 10 seconds

Define

Deliberate design decisions

What I chose "not to do" matters as much as what I did

A clean white desk with a single monitor by the window
The screen has one job: display. A narrow scope makes it hard to break · Photo: Andres Jasso / Unsplash

This screen has one job: display. It doesn't calculate horoscopes, doesn't call AI, holds no keys, and doesn't reach the internet except to talk to the backend at home. With a scope this tight, the firmware is just "fetch JSON and draw", which is easy to debug and hard to break.


A screen, not a brain

Heavy logic stays on the Mac; the screen just fetches JSON and draws


No keys in the firmware

The board sits on a desk; anyone who picks it up gets nothing from it


LAN only

Portfolio and session data never go to the cloud


Config without flashing

Everything is adjusted from the phone; the USB cable can go in a drawer


Level Up · Reflect

Knowledge domains that got stronger

5 areas where my level really moved up from this project

Close-up of a green circuit board and chips
Hardware, fonts, networking and data design — what one screen taught me · Photo: Chris Ried / Unsplash
1. Embedded UI with LVGL 9 — from "drawing text" to "designing a card system":

I learned the object tree, style selectors, scroll containers, draw callbacks, and how to update widgets in place instead of rebuilding the whole screen — the difference between a smooth UI and a jumpy one. Lesson: on an MCU, "not redrawing" matters more than drawing beautifully.

2. Thai fonts on embedded systems — down to the glyph level:

Thai rendering needs shaping (GPOS), which LVGL doesn't provide, so the fix has to happen in the font layer: generate raised glyphs into the PUA and map them at render time, plus UTF-8 handling that never cuts mid-byte. Lesson: language support isn't a finishing feature; it's a constraint from the moment you pick a library.

3. Memory on an MCU — telling stack, heap and library pools apart:

I hit both an LVGL pool filling up while the heap was free, and a stack overflow that looked like a plain reboot. Now I can read the symptoms and size the draw buffer within the real DRAM limits. Lesson: "how much RAM is left" is too broad a question for embedded work.

4. Home networking — mDNS, subnets and misleading debugging:

.local needs a responder on both sides, 2.4GHz and 5GHz devices may sit on different subnets and fail to see each other, and testing from your own machine often gives false results. Lesson: always test from the point of view of the device with the problem, not the convenient machine.

5. Thin-client architecture — one data contract that makes extending easy:

Forcing every feature into the same "card" shape let me add 12 things with almost no firmware changes, and always moved heavy logic to the side that's easier to change. Lesson: designing the data contract well up front is how you cut future flashing.

12
Real data cards on the screen
25
commits from bring-up to daily use
฿640
Total hardware cost
0
keys stored on the board

Tan · Natpakan Sirirat

Product Designer & AI Builder — designing user experiences and building AI tools that actually work.

0%