AI-Driven ESP32 Workflow (Spec → Code → Test) Using Claude Code

Andreas Spiess
Andreas SpiessMar 22, 2026

Why It Matters

By automating specification, coding, flashing, and testing, AI dramatically speeds embedded product development and lowers barriers for innovators to bring hardware solutions to market.

Key Takeaways

  • AI agent automates ESP32 firmware development from spec to testing
  • Raspberry Pi workbench enables AI-controlled flashing and serial monitoring
  • iOS voice keyboard uses BLE to turn ESP32 into USB keyboard
  • Docker containers isolate AI coding environment while sharing GitHub repository
  • Automated tests simulate Wi‑Fi, MQTT failures without disrupting real networks

Summary

The video showcases an end‑to‑end AI‑driven workflow for ESP32 development, using Claude Code to generate, compile, flash, and test firmware for an iOS voice‑keyboard project that turns a smartphone’s speech‑to‑text capability into a USB keyboard via BLE.

Key insights include a systematic eight‑step process—repository creation, idea description, functional specification generation, implementation planning, code generation, flashing, testing, and enhancement—automated by an AI agent. A custom "ESP32 workbench" built on a Raspberry Pi Zero 2W provides AI‑controlled serial access, Wi‑Fi access‑point creation, MQTT toggling, and real‑time log monitoring, solving both serial‑port scarcity and realistic testing constraints.

Notable examples: the AI writes a complete functional specification from a markdown idea document, flashes the firmware through the workbench, and validates behavior such as Wi‑Fi dropouts and captive‑portal handling. The entire iOS keyboard prototype, covering BLE communication and USB HID emulation, was built and verified in roughly 1.5 hours, with the AI handling dozens of code iterations and test cycles.

Implications are profound: embedded developers can now prototype complex IoT devices in hours rather than days, reduce reliance on manual debugging, and safely simulate network failures without impacting production environments. This workflow democratizes hardware development, making AI‑augmented engineering accessible to small teams and hobbyists alike.

Original Description

After my last video, many of you asked for a deeper look at how I actually work with AI and the ESP32. So today I will show you a real example project — an iOS voice keyboard for any computer.
But that’s only half of the story.
You will also see how I automatically test ESP32 devices using an “ESP32 workbench” — a Raspberry Pi running special software that allows an AI agent to program, flash, monitor, and even test Wi-Fi and BLE behavior of ESP32 boards.
The second part is a full walk-through, from the installation of Claude Code till the test of the project, if you want to see the extreme power of today’s AI
Links:
USB hub with Ethernet (micro USB for Raspberry): https://de.aliexpress.com/item/1005007714577602.html
Thin Ethernet cable ideal for Desktop: https://s.click.aliexpress.com/e/_c43uarOf
ESP32-S3 Supermini (no reset/GPOI0 pins): https://s.click.aliexpress.com/e/_c3j70cXl
ESP32-S3 Pico for development: https://s.click.aliexpress.com/e/_c3Mayx8F
USB adapter USB-C to USB-A: https://s.click.aliexpress.com/e/_c3PbqIvv
Repo for the entire project (incl. IOS app): https://github.com/SensorsIot/IOS-Keyboard
The links above are usually affiliate links that support the channel (at no additional cost to you).
Supporting Material and Blog Page: http://www.sensorsiot.org
My Patreon Page: / andreasspiess
Discord: / discord
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission on your purchases to buy new stuff for the channel
For AliExpress: For AliExpress: bit.ly/3MtXUY8 (just go on from here to your product)
For Amazon.de: http://amzn.to/2r0ZCYI
For Amazon UK: http://amzn.to/2mxBaJf
I am no longer on X
As an Amazon Associate, I earn from qualifying purchases

Comments

Want to join the conversation?

Loading comments...