Arduino Code Generator
Generate production-ready Arduino and embedded C++ for UNO, ESP32, and RP2040. Sensors, actuators, I2C/SPI, non-blocking timers, state machines, EEPROM, SD logging, and WiFi — with proper memory management and board-specific optimization.
This skill produces reliable embedded C++ for common microcontrollers. It generates driver code for sensors and actuators (DHT22, BME280, buttons, I2C/SPI peripherals), non-blocking timing patterns and state machines, EEPROM and SD-card data logging, and WiFi connectivity — writing memory-conscious code tuned to UNO, ESP32, or RP2040 instead of blocking delay() spaghetti.
When to use
Use when writing Arduino or embedded C++ for UNO, ESP32, or RP2040 — driving sensors and actuators, implementing non-blocking timers or state machines, using I2C/SPI, logging to EEPROM or SD, or adding WiFi to a microcontroller project.
Examples
Non-blocking sensor loop
Read a sensor without delay()
Write ESP32 code that reads a BME280 every 2 seconds using millis()-based non-blocking timing and publishes the values over WiFi to an MQTT broker
Debounced state machine
Robust button handling
Generate an Arduino state machine for a UNO that debounces two buttons and cycles an LED through off/slow-blink/fast-blink modes
SD data logger
Persist readings to storage
Create RP2040 code that logs timestamped analog readings to an SD card in CSV, rotating the file daily and handling card-removal errors