Arduino Project Builder Skill
Purpose: Assemble complete, working Arduino projects from requirements. This skill combines multiple patterns (sensors, actuators, state machines, logging, communication) into cohesive systems.
When to Use: When user requests a complete project like "build an environmental monitor", "create a robot controller", "make an IoT temperature logger", or any multi-component Arduino application.
Quick Start
List available project types:
uv run scripts/scaffold_project.py --list
Create a complete project:
uv run scripts/scaffold_project.py --type environmental --board esp32 --name "WeatherStation"
uv run scripts/scaffold_project.py --type robot --board uno --output ./my-robot
Interactive mode:
uv run scripts/scaffold_project.py --interactive
Resources
- scripts/scaffold_project.py - CLI tool for project scaffolding (config.h, main.ino, platformio.ini, README)
- assets/workflow.mmd - Mermaid diagram of project assembly workflow
Supported Project Types
- Environmental Monitors - Multi-sensor data loggers (temperature, humidity, light, air quality)
- Robot Controllers - Motor control, sensor fusion, obstacle avoidance, state machines
- IoT Devices - WiFi/MQTT data transmission, cloud integration, remote monitoring
- Home Automation - Relay control, scheduled tasks, sensor-triggered actions
- Data Acquisition Systems - High-frequency sampling, SD card logging, real-time visualization
Project Assembly Workflow
1. Requirements Gathering
- User Intent: Understand the project goal (what should it do?)
- Hardware Inventory: What sensors, actuators, and communication modules?
- Board Selection: Arduino UNO, ESP32, or Raspberry Pi Pico?
- Constraints: Power source, memory limits, real-time requirements
2. Architecture Design
- Component Diagram: Which sensors/actuators connect to which pins?
- Data Flow: How does data move through the system?
- State Machine: Does the project have distinct modes/states?
- Timing Requirements: What tasks run at what intervals?
3. Code Assembly
- Pull patterns from references/ (environmental-monitor, robot-controller, iot-device)
- Customize for user's hardware (pin assignments, sensor types)
- Integrate state machine (if project has modes)
- Add data logging (Serial, SD card, or EEPROM)
4. Testing & Validation
- Compilation Check: Does it compile for the target board?
- Memory Usage: Within board limits? (UNO has only 2KB SRAM)
- Pin Conflicts: No duplicate pin assignments?
- Timing Analysis: All tasks fit within loop execution time?
5. Documentation
- Wiring Diagram: Pin connections in text/ASCII format
- Usage Instructions: How to upload, configure, and run
- Serial Commands: What commands trigger actions?
- Troubleshooting: Common issues and fixes
Board-Specific Considerations
Arduino UNO/Nano (ATmega328P):
- 2KB SRAM → Keep arrays small, use F() macro for strings
- 10-bit ADC → Range 0-1023
- No WiFi → Use Serial or add external module
ESP32:
- 327KB SRAM → Can use large buffers
- 12-bit ADC → Range 0-4095
- Built-in WiFi/Bluetooth → Ideal for IoT projects
- Dual-core → Can run tasks in parallel
Raspberry Pi Pico (RP2040):
- 262KB SRAM → Plenty of room
- 12-bit ADC → Range 0-4095
- No WiFi (unless Pico W) → Serial or add module
- Dual-core → Advanced task scheduling
Quality Standards
All generated projects must include:
- config.h - Hardware abstraction (board detection, pin definitions)
- Non-blocking code - No delay() calls, use EveryMs timers
- Error handling - Check for sensor failures, out-of-range values
- Serial diagnostics - Print status messages, sensor readings
- Memory safety - Bounds checking on arrays, CRC for stored data
- Wiring documentation - Clear pin assignment table
- Compilation testing - Verify it compiles for target board
Integration Checklist
Before delivering a project, verify:
Common Project Patterns
1. Sensor → Filter → Display → Log
- Read sensor with EveryMs timer
- Apply MovingAverageFilter or MedianFilter
- Print to Serial every 5 seconds
- Log CSV every 60 seconds
2. Button → State Machine → Actuator
- DebouncedButton detects input
- State machine transitions modes
- Actuator (motor, relay, LED) responds to state
3. Sensor → Threshold → Action
- Continuous sensor monitoring
- If value exceeds threshold, trigger action
- Hysteresis to prevent oscillation
4. Multi-Sensor → Data Logger → SD Card
- Multiple EveryMs timers for different sensors
- Aggregate data into struct
- Buffered SD card writes (flush every 10 entries)
5. IoT: Sensor → WiFi → MQTT → Cloud
- ESP32 connects to WiFi
- Read sensors every 60 seconds
- Publish JSON to MQTT broker
- Reconnect logic if connection drops
Project References
See references/ directory for complete project examples:
project-environmental-monitor.md - Multi-sensor data logger
project-robot-controller.md - Button-controlled robot with obstacle avoidance
project-iot-device.md - ESP32 temperature/humidity logger with WiFi
project-home-automation.md - Relay controller with scheduled tasks
project-data-acquisition.md - High-speed ADC sampling with SD logging
Communication & Output
Present projects as:
- Full .ino file (ready to upload)
- Wiring table (pin connections)
- Upload instructions (board selection, baud rate)
- Usage guide (Serial commands, expected output)
Example Output Format:
=== Environmental Monitor for Arduino UNO ===
WIRING:
DHT22 → Pin 2
Photoresistor → A0
Button → Pin 3 (INPUT_PULLUP)
LED → Pin 13
UPLOAD:
Board: Arduino UNO
Baud Rate: 9600
USAGE:
- Press button to start/stop logging
- Send 'd' to dump CSV data
- LED blinks every 2 seconds (heartbeat)
CODE:
[Full .ino file here]
Next Steps: When user requests a project, ask clarifying questions about:
- Hardware components (what sensors/actuators?)
- Target board (UNO, ESP32, Pico?)
- Data output (Serial, SD card, WiFi?)
- Special requirements (battery power, waterproof enclosure?)
Then assemble the project using patterns from references/, customize for their hardware, and deliver a complete, tested system.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: arduino-project-builder-23description: Build complete, production-ready Arduino projects (environmental monitors, robot controllers, IoT devices, automation systems). Assembles multi-component systems combining sensors, actuators, communication protocols, state machines, data logging, and power management. Supports Arduino UNO, ESP32, and Raspberry Pi Pico with board-specific optimizations. Use this skill when users request complete Arduino applications, not just code snippets. Use when this capability is needed.4---56# Arduino Project Builder Skill78**Purpose:** Assemble complete, working Arduino projects from requirements. This skill combines multiple patterns (sensors, actuators, state machines, logging, communication) into cohesive systems.910**When to Use:** When user requests a complete project like "build an environmental monitor", "create a robot controller", "make an IoT temperature logger", or any multi-component Arduino application.1112## Quick Start1314**List available project types:**15```bash16uv run scripts/scaffold_project.py --list17```1819**Create a complete project:**20```bash21uv run scripts/scaffold_project.py --type environmental --board esp32 --name "WeatherStation"22uv run scripts/scaffold_project.py --type robot --board uno --output ./my-robot23```2425**Interactive mode:**26```bash27uv run scripts/scaffold_project.py --interactive28```2930## Resources3132- **scripts/scaffold_project.py** - CLI tool for project scaffolding (config.h, main.ino, platformio.ini, README)33- **assets/workflow.mmd** - Mermaid diagram of project assembly workflow3435## Supported Project Types36371. **Environmental Monitors** - Multi-sensor data loggers (temperature, humidity, light, air quality)382. **Robot Controllers** - Motor control, sensor fusion, obstacle avoidance, state machines393. **IoT Devices** - WiFi/MQTT data transmission, cloud integration, remote monitoring404. **Home Automation** - Relay control, scheduled tasks, sensor-triggered actions415. **Data Acquisition Systems** - High-frequency sampling, SD card logging, real-time visualization4243## Project Assembly Workflow4445### 1. Requirements Gathering46- **User Intent:** Understand the project goal (what should it do?)47- **Hardware Inventory:** What sensors, actuators, and communication modules?48- **Board Selection:** Arduino UNO, ESP32, or Raspberry Pi Pico?49- **Constraints:** Power source, memory limits, real-time requirements5051### 2. Architecture Design52- **Component Diagram:** Which sensors/actuators connect to which pins?53- **Data Flow:** How does data move through the system?54- **State Machine:** Does the project have distinct modes/states?55- **Timing Requirements:** What tasks run at what intervals?5657### 3. Code Assembly58- **Pull patterns from references/** (environmental-monitor, robot-controller, iot-device)59- **Customize for user's hardware** (pin assignments, sensor types)60- **Integrate state machine** (if project has modes)61- **Add data logging** (Serial, SD card, or EEPROM)6263### 4. Testing & Validation64- **Compilation Check:** Does it compile for the target board?65- **Memory Usage:** Within board limits? (UNO has only 2KB SRAM)66- **Pin Conflicts:** No duplicate pin assignments?67- **Timing Analysis:** All tasks fit within loop execution time?6869### 5. Documentation70- **Wiring Diagram:** Pin connections in text/ASCII format71- **Usage Instructions:** How to upload, configure, and run72- **Serial Commands:** What commands trigger actions?73- **Troubleshooting:** Common issues and fixes7475## Board-Specific Considerations7677**Arduino UNO/Nano (ATmega328P):**78- 2KB SRAM → Keep arrays small, use F() macro for strings79- 10-bit ADC → Range 0-102380- No WiFi → Use Serial or add external module8182**ESP32:**83- 327KB SRAM → Can use large buffers84- 12-bit ADC → Range 0-409585- Built-in WiFi/Bluetooth → Ideal for IoT projects86- Dual-core → Can run tasks in parallel8788**Raspberry Pi Pico (RP2040):**89- 262KB SRAM → Plenty of room90- 12-bit ADC → Range 0-409591- No WiFi (unless Pico W) → Serial or add module92- Dual-core → Advanced task scheduling9394## Quality Standards9596All generated projects must include:971. **config.h** - Hardware abstraction (board detection, pin definitions)982. **Non-blocking code** - No delay() calls, use EveryMs timers993. **Error handling** - Check for sensor failures, out-of-range values1004. **Serial diagnostics** - Print status messages, sensor readings1015. **Memory safety** - Bounds checking on arrays, CRC for stored data1026. **Wiring documentation** - Clear pin assignment table1037. **Compilation testing** - Verify it compiles for target board104105## Integration Checklist106107Before delivering a project, verify:108- [ ] All sensor readings validated (NaN checks, range checks)109- [ ] Button inputs debounced (50ms minimum)110- [ ] I2C devices scanned and detected111- [ ] CSV logging includes headers112- [ ] State machine has default/error states113- [ ] EEPROM writes include CRC validation114- [ ] WiFi reconnection logic (ESP32 projects)115- [ ] LED indicators for system status116- [ ] Serial baud rate matches board (9600 for UNO, 115200 for ESP32)117- [ ] F() macro used for all string literals118119## Common Project Patterns120121**1. Sensor → Filter → Display → Log**122- Read sensor with EveryMs timer123- Apply MovingAverageFilter or MedianFilter124- Print to Serial every 5 seconds125- Log CSV every 60 seconds126127**2. Button → State Machine → Actuator**128- DebouncedButton detects input129- State machine transitions modes130- Actuator (motor, relay, LED) responds to state131132**3. Sensor → Threshold → Action**133- Continuous sensor monitoring134- If value exceeds threshold, trigger action135- Hysteresis to prevent oscillation136137**4. Multi-Sensor → Data Logger → SD Card**138- Multiple EveryMs timers for different sensors139- Aggregate data into struct140- Buffered SD card writes (flush every 10 entries)141142**5. IoT: Sensor → WiFi → MQTT → Cloud**143- ESP32 connects to WiFi144- Read sensors every 60 seconds145- Publish JSON to MQTT broker146- Reconnect logic if connection drops147148## Project References149150See `references/` directory for complete project examples:151- `project-environmental-monitor.md` - Multi-sensor data logger152- `project-robot-controller.md` - Button-controlled robot with obstacle avoidance153- `project-iot-device.md` - ESP32 temperature/humidity logger with WiFi154- `project-home-automation.md` - Relay controller with scheduled tasks155- `project-data-acquisition.md` - High-speed ADC sampling with SD logging156157## Communication & Output158159**Present projects as:**1601. **Full .ino file** (ready to upload)1612. **Wiring table** (pin connections)1623. **Upload instructions** (board selection, baud rate)1634. **Usage guide** (Serial commands, expected output)164165**Example Output Format:**166```167=== Environmental Monitor for Arduino UNO ===168169WIRING:170DHT22 → Pin 2171Photoresistor → A0172Button → Pin 3 (INPUT_PULLUP)173LED → Pin 13174175UPLOAD:176Board: Arduino UNO177Baud Rate: 9600178179USAGE:180- Press button to start/stop logging181- Send 'd' to dump CSV data182- LED blinks every 2 seconds (heartbeat)183184CODE:185[Full .ino file here]186```187188---189190**Next Steps:** When user requests a project, ask clarifying questions about:1911. Hardware components (what sensors/actuators?)1922. Target board (UNO, ESP32, Pico?)1933. Data output (Serial, SD card, WiFi?)1944. Special requirements (battery power, waterproof enclosure?)195196Then assemble the project using patterns from references/, customize for their hardware, and deliver a complete, tested system.197198---199> Converted and distributed by [TomeVault](https://tomevault.io/claim/wedsamuel1230) — claim your Tome and manage your conversions.200<!-- tomevault:4.0:skill_md:2026-04-14 -->