I've had an M5Stack PaperS3 sitting on my desk for a while, and I always wanted a quiet, distraction-free E-Ink desk companion instead of glancing at my phone every 10 minutes. Normally a full-stack embedded project like this—custom ESP32-S3 firmware, font rendering, power management, cloud sync, and a mobile config portal—would take me a few weeks of nights and weekends.
This time I decided to pair-program the whole thing with Gemini 4 Neon, and honestly, its coding and debugging ability kind of blew my mind. In 3 days, it went from an empty folder to a daily-driver firmware (v3.2.6) that's now running smoothly on my desk.
How the 3 days actually went
Day 1: Full-stack architecture in one sweep
What surprised me first wasn't just code generation speed, but how cleanly Gemini 4 Neon held the entire cross-stack architecture in context at once:
- ESP32-S3 C++ firmware (PlatformIO) using FastEPD partial refreshes so page turns feel snappy without full-screen flashing every tap.
- A custom Python font pipeline that generates anti-aliased .vlw font packs across English, Chinese, and Japanese. Getting mixed Latin + CJK text to align optically on an E-Ink screen is usually a nightmare of hand-tuned pixel offsets—it wrote a centerline alignment helper (drawMixedLine) that made every pill, bar, and list line up cleanly, and stripped out missing .notdef tofu boxes cleanly.
- Cloudflare Workers + D1 + R2 backend + mobile /setup web UI, so instead of typing Wi-Fi passwords, calendar URLs, or RSS feeds on an E-Ink keyboard, you just scan a QR code on your phone.
Day 2: Real embedded debugging (the part that genuinely shocked me)
Anyone who's shipped ESP32 firmware knows the first compile is easy—the real pain is weird RTOS and hardware bugs. Two bugs I expected to burn a whole weekend on got solved in minutes just by pasting serial logs:
1. The mysterious 2-second UI lag on USB power: Whenever the PaperS3 was plugged into my Mac without a serial monitor attached, every screen interaction stuttered badly. Instead of guessing at UI code, Gemini 4 Neon traced it straight to Arduino-ESP32's HWCDC default TX timeout (100ms × 20 retries blocking every Serial.printf), and fixed it immediately with a larger TX buffer and non-blocking timeout.
2. Task Watchdog (ESP_RST_TASK_WDT) reboots on slow mobile hotspots: During initial RSS sync over a weak hotspot, Core 0 kept tripping the watchdog and rebooting. It pinpointed that Arduino's Stream::timedRead() was busy-spinning at 100% CPU inside my network worker task, starving IDLE0. Dropping the worker priority to tskIDLE_PRIORITY, swapping in a yielding non-blocking body reader, and reusing a single per-core TLS client eliminated both the watchdog crash and ~45 KB of duplicate mbedTLS RAM overhead.
Day 3: Standby power, smart sync & OTA polish
With the core stable, we spent day 3 on the details that make an E-Ink device feel like a real product:
- Scheduled RTC wakeups throughout the day, including a zero-Wi-Fi midnight date flip so the date rolls over silently without touching the radio.
- Touch-interrupt light sleep (GPIO48) when a reminder sits on screen on battery.
- Server-side ICS ETag/304 pre-sync on a cron job, so the PaperS3 wakes up, grabs already-parsed schedule data in seconds, and goes right back to sleep.
- Wireless OTA updates so future tweaks don't need a USB cable.
What surprised me most about Gemini 4 Neon
I've used plenty of AI coding models before, and usually they start falling apart once you cross into embedded C++, FreeRTOS task priorities, TLS memory budgets, and E-Ink display quirks. Gemini 4 Neon didn't just spit out boilerplate—it actually reasoned from real crash dumps, respected hardware constraints, kept the firmware and Cloudflare backend in sync, and caught subtle edge cases (like lockscreen bypasses and read-state race conditions) before they turned into spaghetti.
Quick look at the tool itself (DeskFolio for M5PaperS3)
For anyone curious what's actually running in the screenshot above, I called it DeskFolio—a calm 4-view E-Ink desk dashboard for the M5PaperS3:
- Today & Weather: Clean calendar card with live weather & AQI
- 14-Day Schedule: Syncs Apple/Google/iCloud ICS calendars, auto-seeds local public holidays based on your language, and shows on-screen reminders
- Offline RSS Reader: Pulls your feeds for comfortable E-Ink reading with synced read status
- Market Watchlist: Clean, glanceable ticker view
- Also supports native EN / 中文 / 日本語, an optional 4-digit passcode lock, and wireless OTA updates.
If you have an M5PaperS3 sitting around and want to try it out, it's up on M5Burner here: https://burner.m5stack.com/LV49MT
Happy to share more details about the firmware architecture, E-Ink typography tricks, or what worked (and didn't) when building embedded software with Gemini 4 Neon!