
Introduction
This article presented by a Swiss-accented maker and embedded systems enthusiast, showcases a compelling real-world demonstration of AI-assisted hardware development. Rather than a simple “prompt and hope” approach, the creator reveals a disciplined, eight-step workflow that takes an ESP32 project from a rough idea all the way to automated testing — using Claude Code as the central AI agent. The showcase project is an iOS Voice Keyboard: a system where a smartphone performs speech recognition, transmits the text via BLE to an ESP32, which then emulates a USB keyboard to type into any Windows or Linux computer. It’s a practical, multilingual, and inexpensive alternative to costly dictation software. Video about AI-Driven ESP32 Workflow inside.
About ESP32 — and How to Apply AI to ESP32 Workflow
Part 1: What Is the ESP32?
The ESP32 microcontroller has quickly become one of the most popular choices for building IoT projects. With built-in Wi-Fi, Bluetooth, and low-power capabilities, the ESP32 is powerful, affordable, and versatile — making it a favorite among hobbyists, engineers, and startups alike. It is a low-cost, low-power system on a chip (SoC) developed by Espressif Systems, the successor to the ESP8266, with significantly more processing power, memory, and connectivity options.
Core Hardware Specifications
The ESP32 uses a Tensilica Xtensa 32-bit LX6 microprocessor, typically in a dual-core architecture. The clock frequency reaches up to 240 MHz and it performs up to 600 DMIPS. Its low power consumption allows for computation and level thresholds even while the chip is in deep sleep mode. Wireless connectivity covers integrated Wi-Fi through 802.11 b/g/n/e/i, and Bluetooth connectivity is also supported.
Key internal memory specs include:
- ROM: 448 KB (booting and core functions)
- SRAM: 520 KB (data and instructions)
- RTC fast SRAM: 8 KB (used during sleep wake cycles)
- External Flash: Up to 4 × 16 MB via QSPI with hardware AES encryption
Powered by 40 nm technology, ESP32 offers excellent power efficiency, RF performance, security, and reliability, making it suitable for a wide range of application scenarios and power consumption requirements.
The ESP32 Family — Choosing the Right Chip
More recently, new models were added, including the ESP32-C and -S series, which include both single and dual core variations. These two series rely on a RISC-V CPU model — similar to the ARM architecture but open source and well-supported by GNU compilers, while the Xtensa needed extra development to work with those compilers.
| Model | CPU | Key Feature |
|---|---|---|
| ESP32 (original) | Dual-core Xtensa LX6, 240 MHz | Wi-Fi + BT Classic + BLE |
| ESP32-S2 | Single-core Xtensa LX7 | USB OTG, no BT Classic |
| ESP32-S3 | Dual-core Xtensa LX7 | AI vector instructions, USB OTG |
| ESP32-C3 | Single-core RISC-V | Wi-Fi + BLE 5, compact + cost-efficient |
| ESP32-P4 | Dual-core RISC-V, 400 MHz | High-performance, no onboard Wi-Fi |
Part 2: Why the ESP32 Dominates IoT Development
Built-in Connectivity
ESP32 eliminates the need for external communication modules. It connects directly to local networks, cloud servers, or nearby devices via BLE. Its deep sleep modes extend battery life for months, and development boards typically cost under $10, making them cost-effective for both prototyping and mass deployment.
Security Features
The ESP32 supports all IEEE 802.11 standard security features, including WFA, WPA/WPA2 and WAPI. Beyond wireless security, the platform also offers secure boot (ensuring only trusted firmware runs), flash encryption, and TLS/SSL with hardware acceleration for cloud communication.
Programming Environments
The ESP32 supports multiple programming environments: Arduino IDE, which is beginner-friendly with prebuilt libraries, and ESP-IDF (Espressif IoT Development Framework), for advanced developers needing full control. This flexibility ensures the ESP32 works for both hobby projects and enterprise IoT solutions. MicroPython is also widely used, lowering the barrier for Python developers entering embedded systems.
Part 3: What Can You Build with ESP32?
Popular ESP32 IoT applications include: Smart Home Automation — controlling lights, appliances, and security systems over Wi-Fi or BLE; Wearable Devices — tracking fitness and health metrics; Industrial IoT — monitoring machinery and enabling predictive maintenance; Environmental Monitoring — collecting real-time data from temperature, humidity, or air-quality sensors; Robotics and Drones — enabling wireless control and real-time telemetry; and Smart Agriculture — automating irrigation and monitoring soil conditions remotely.
Beyond those, ESP32 also powers smart medical devices such as health monitoring systems and medical wearables, smart energy devices like HVAC systems and thermostats, and smart security devices including surveillance cameras and access control systems.
Part 4: AI Applied to the ESP32 — Two Distinct Dimensions
There are two fundamentally different ways AI intersects with the ESP32 world, and it is important to understand both:
Dimension A — AI as Development Partner: Using AI coding agents (Claude Code, Gemini CLI, Codex) to write, flash, test, and debug ESP32 firmware for you.
Dimension B — AI Running on the ESP32 Itself: Using TinyML frameworks to deploy machine learning inference directly on the chip.
Part 5: AI as Your ESP32 Development Partner
Claude Code and the Agentic Firmware Workflow
Claude Code is a command-line-first AI assistant made specifically to automate tedious development workflows. It can understand and carry out complex, multi-step tasks right in your terminal — using your shell, running your test suite, interacting with git, and refactoring entire files, all based on plain English commands.
The proven 8-step workflow from the Swiss-accented maker video demonstrates this in full:
- Repository Creation — Claude creates your GitHub repo and handles all Git syntax from that point forward.
- Idea Description — A Markdown document captures the concept. Markdown is the native language of AI-readable docs.
- Functional Specification (FSD) Generation — A Claude “skill” (custom SOP) reads the idea doc and generates a complete engineering spec including MCU choice, protocols, error handling, and test cases.
- Implementation Planning — Claude breaks the project into phases to manage complexity.
- Code Generation and Compilation — Claude writes code and autonomously resolves most compilation errors.
- Device Flashing — Claude commands the workbench to flash firmware and monitors serial output for boot confirmation.
- Automated Testing — Claude runs all FSD-defined test cases, fixes failures, and retests.
- Continuous Enhancement — Improvements are fed back into the FSD and implemented iteratively.
From real-world experience coding an energy monitor ESP32 project with Claude Code, Claude handled miscellaneous display changes and binary search optimizations successfully without the developer needing to reference library documentation directly — a significant time saver.
The ESP32 Workbench Concept — Hardware Test Lab for AI Agents
One of the most innovative ideas in AI-assisted ESP32 development is building a dedicated hardware testing rig that an AI agent can control autonomously. A Raspberry Pi Zero 2W with a USB hub running Python scripts can:
- Expose ESP32 serial ports over Ethernet to a VM
- Create an isolated Wi-Fi Access Point for safe testing
- Simulate network failures, captive portals, wrong MQTT passwords, and broker outages
- Monitor serial output and report results back to the AI
This transforms the AI from a code generator into a full-stack embedded engineer capable of flash → monitor → test → fix cycles without human intervention.
Espressif’s Own MCP Integration
ESP RainMaker now supports the Model Context Protocol (MCP), enabling natural language interactions with your IoT devices via tools like Claude, Cursor, Gemini CLI, and others. This allows AI agents to read and change device state, invoke APIs, access knowledge bases, and make decisions based on context — unlocking intelligent assistants in companion apps, natural multi-lingual voice interfaces for device control, and ambient intelligence driven by events from sensors, cloud rules, and other services.
The ESP32_AI_Connect Library — Putting Cloud LLMs Inside Your Firmware
ESP32_AI_Connect is an Arduino library that enables ESP32 microcontrollers to interact seamlessly with popular AI APIs including OpenAI, Claude, Gemini, and DeepSeek. It features multi-platform support through a single interface, tool call capabilities, streaming support with thread safety, and an optional auto-retry mechanism with exponential backoff for transient failures — designed for resilient real-world IoT deployments such as AI-powered home assistants that may idle for extended periods.
Knowing the Limits: When AI Helps and When It Doesn’t
In a real-world test using Claude Code to build a Google Nest Hub-style device on an ESP32-P4, the AI did well at breaking down the project into subtasks and documenting the process throughout. However, by the end of the development cycle, there were numerous compilation errors, architectural mistakes, and wildly incorrect assumptions — particularly around hardware-specific libraries that had no documentation in Claude’s context.
The practical lesson: AI excels at boilerplate generation, protocol implementation, Git management, and test scripting. It struggles with underdocumented hardware-specific libraries, complex memory allocation across PSRAM boundaries, and deeply nested RTOS architecture decisions. Human oversight at architecture-level decisions remains essential.
Part 6: AI Running Inside the ESP32 — TinyML
What Is TinyML?
TinyML optimizes ML models to work on resource-constrained edge devices. It eliminates the necessity of data transmission to a central server and opens up new possibilities by bringing intelligence to millions of devices. Since TinyML enables on-device analytics without sending data to a server, edge devices can process data and provide inference with low latency, maintain data privacy by keeping data on the device, and operate without depending on connectivity.
Why ESP32 Is a TinyML-Capable Platform
With optimized frameworks such as TensorFlow Lite for Microcontrollers, neural networks can be run on microcontrollers like the ESP32, without the need for a complex operating system. A typical execution pipeline involves capturing data from a sensor, preprocessing it, and passing it through the neural network to get a prediction — with inference occurring in milliseconds, making the system responsive without needing to connect to an external server.
Real-World TinyML on ESP32 — What’s Proven
Research has demonstrated the deployment of a TinyML-based speech recognition system on an ESP32 microcontroller using Edge Impulse for model development, Mel-Frequency Cepstral Coefficients for feature extraction, and TensorFlow Lite for Microcontrollers for inference. Using Edge Impulse’s EON Compiler, the model was fully quantized and optimized, achieving a 37% reduction in RAM usage and 27% in ROM.
In another experiment, on-device inference on an ESP32 was chosen over cloud inference to reduce bandwidth requirements, enhance privacy, and reduce energy consumption — the model predicted soil moisture content using a DNN and LSTM model, achieving 97% accuracy with an average inference time of 97.8 ms.
TinyML Frameworks to Use with ESP32
| Framework | Best For |
|---|---|
| TensorFlow Lite for Microcontrollers (TFLM) | Maximum optimization, ARM/Xtensa targets |
| Edge Impulse | No-code/low-code model training + deployment |
| PyTorch Mobile | Teams already in the PyTorch ecosystem |
| MicroPython + uTensor | Python-first rapid prototyping |
ABI Research estimates that 2.5 billion devices will be shipped with a TinyML chipset by 2030, focusing on advanced automation, low cost, low latency, and ultra-power-efficient AI chipsets — performing AI inference almost fully on the board.
Part 7: The Combined Future — AI-Assisted Development of AI-Running Devices
The most powerful trend in 2025–2026 is the convergence of both dimensions:
- Use Claude Code or Gemini CLI as your AI development partner to write and test TinyML firmware for ESP32
- Deploy TensorFlow Lite Micro or Edge Impulse models that run inference locally on the chip
- Connect the device to ESP RainMaker with MCP for natural-language cloud control
- Use ESP32_AI_Connect when cloud LLM reasoning is needed for complex decisions
The intersection of hardware and software in embedded systems offers a wealth of opportunities for innovation. Whether you’re a seasoned developer or a hobbyist, the potential for exploration and discovery is limitless.
Video about AI-Driven ESP32 Workflow
Inside Video:
The Core Problem: Infrastructure for AI Hardware Development
Before any AI magic can happen, two foundational engineering problems had to be solved.
Serial Port Access — The creator runs AI development inside Docker containers on a Proxmox virtual machine for security isolation (keeping the AI agent away from the host machine). However, with only one serial controller and Home Assistant occupying it for a Zigbee dongle, there was simply no serial port left for ESP32 flashing.
Realistic Testing Conditions — Most ESP32 projects depend on Wi-Fi, MQTT, and captive portals. You cannot properly test failure scenarios (dropped Wi-Fi, offline broker, wrong passwords) if you’re on a live home network.
The ESP32 Workbench: An Automated Hardware Test Lab
To solve both problems simultaneously, the creator built what he calls an ESP32 Workbench — a Raspberry Pi Zero 2W with a USB hub running custom Python software. This compact system can:
- Connect multiple ESP32 boards via USB and expose their serial ports to the VM over Ethernet
- Create a dedicated Wi-Fi Access Point for isolated testing
- Simulate captive portal interactions, Wi-Fi toggling, and MQTT broker on/off switching
- Monitor serial output automatically
Most importantly, the entire workbench is designed to be controlled directly by an AI agent. This means Claude Code can flash firmware, watch serial logs, run test cases, validate results, and even fix code bugs — all without human intervention in the loop.
This mirrors the broader vision for Claude as an AI agent: with well-structured prompts and full environment access, it can execute multi-step developer tasks such as creating repositories, flashing firmware, and making commits — tasks that previously required hands-on developer involvement.
The 8-Step AI Development Workflow
The creator’s workflow is methodical and repeatable across projects:
Step 1 — Create a Repository Every project begins with GitHub. The AI is asked to create the repository immediately, providing version control safety and public sharing. Git commits and pushes are handled by Claude throughout development — no Git syntax memorization needed.
Step 2 — Describe the Idea A simple Markdown document captures the project concept. Markdown is increasingly the standard format for AI-readable documentation.
Step 3 — Generate the Functional Specification (FSD) This is a standout step. The creator built a Standard Operating Procedure (SOP) implemented as a Claude “skill” that reads the idea document and auto-generates a complete Functional Specification Document — covering the MCU choice, communication protocols, error handling, and crucially, test cases. Establishing a structured workflow where Claude outlines tasks and generates specifications before implementation is a proven way to maximize the strengths of AI coding tools.
Step 4 — Implementation Planning With the FSD ready, Claude plans the implementation, breaking large projects into phases to manage complexity.
Step 5 — Code Generation Claude writes and compiles the code. Compilation errors, when they occur, are generally resolved by the AI autonomously across a few iterations.
Step 6 — Flash the Device Once compilation succeeds, Claude commands the ESP32 Workbench to flash firmware and immediately monitors the serial output to confirm a successful boot.
Step 7 — Run Tests Claude executes all test cases defined in the FSD. Passing tests close the phase; failures trigger code fixes and re-testing automatically.
Step 8 — Enhance the Project After real-world usage, improvements are fed back either into the FSD (for structured enhancement) or given directly to Claude for implementation with FSD updates. The cycle is designed to be continuous and low-friction.
The iOS Voice Keyboard Project in Practice
The demo project — built across two phases in approximately 1.5 hours total — illustrates the workflow end-to-end. The ESP32 listens for BLE text from an iOS device and emulates a standard USB HID keyboard, enabling multilingual dictation into any application on Windows or Linux without any special software on the host computer. The video runs at real time (with only boring parts sped up), giving viewers an honest picture of how many code lines were generated and how the AI handled compilation and testing cycles.
Conclusion & Key Takeaways
The ESP32 has evolved from a $10 Wi-Fi chip into the backbone of the entire edge-AI revolution. In 2026, it sits at the center of two converging forces: AI agents that help you build firmware faster, and TinyML models that make the firmware itself intelligent.
This article stands out not just as an ESP32 project tutorial, but as a blueprint for AI-augmented embedded development. The creator’s approach — isolating the AI in containers, building a dedicated hardware test lab, and formalizing workflow steps from spec to test — represents a mature, production-minded methodology rather than ad-hoc prompting.
Key Takeaways
- Security-first AI access: Run Claude Code in containers or VMs to give the AI full dev environment access without exposing your host machine.
- The Functional Specification Document is the secret weapon: Auto-generating specs and test cases from an idea document transforms vague intentions into executable, testable engineering plans.
- Hardware testing can be automated: The ESP32 Workbench concept — a Pi-based lab controllable by an AI agent — is replicable and invaluable for any serious IoT developer.
- The workflow is tool-agnostic: Claude Code is used here, but the eight-step methodology works with Codex, Gemini, or any capable AI coding agent.
- Iteration is built-in, not an afterthought: Phases, test cases, and continuous FSD updates make the process robust against changing requirements.
Related References
- GitHub Repository for the iOS Voice Keyboard Project:
- Claude Code by Anthropic: https://www.anthropic.com/claude-code
- ESP-IDF (Espressif IoT Development Framework): https://docs.espressif.com/projects/esp-idf/
- Raspberry Pi Zero 2W (ESP32 Workbench host): https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/
- Glasp — AI Workflow with Claude Agents: https://glasp.co/hatch/gabe/p/LPTRQz9MZkZdYJveLpfR
- Glasp — Structured AI Coding Workflows: https://glasp.co/hatch/hEWU2OC6UMYpdaHUut0A7rgIbqR2/p/l2El6j4IBM9IJglvNXhR
- Espressif ESP-IDF Documentation: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/
- ESP RainMaker + MCP (AI Agent Integration): https://developer.espressif.com/blog/2025/12/annoucing_esp_private_agents_platform/
- ESP32_AI_Connect Library (GitHub): https://github.com/AvantMaker/ESP32_AI_Connect
- Edge Impulse (TinyML Platform): https://edgeimpulse.com
- Claude Code with ESP32 Arduino (Forward.com.au): https://www.forward.com.au/pfod/claudeAI/index.html
- TinyML on ESP32-CAM (Edge AI): https://sonysunny.com/blog/ai-on-the-edge-esp32-cam-tinyml
- Glasp — ESP32 and Embedded AI Insights: https://glasp.co/hatch/7S38QSDBCAWUxhXffEoVEerGQWL2/p/BewJJgGy8WziRIjDZd5W
- Glasp — Claude as an AI Agent for Development: https://glasp.co/hatch/gabe/p/LPTRQz9MZkZdYJveLpfR

