arduino-code-generator
Generate Arduino/embedded C++ code snippets and patterns on demand for UNO/ESP32/RP2040. Use when users request Arduino code for sensors, actuators, communication protocols, state machines, non-blocking timers, data logging, or hardware abstraction. Generates production-ready code with proper memory management, timing patterns, and board-specific optimization. Supports DHT22, BME280, buttons, I2C/SPI, EEPROM, SD cards, WiFi, and common peripherals.
Best use case
arduino-code-generator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate Arduino/embedded C++ code snippets and patterns on demand for UNO/ESP32/RP2040. Use when users request Arduino code for sensors, actuators, communication protocols, state machines, non-blocking timers, data logging, or hardware abstraction. Generates production-ready code with proper memory management, timing patterns, and board-specific optimization. Supports DHT22, BME280, buttons, I2C/SPI, EEPROM, SD cards, WiFi, and common peripherals.
Teams using arduino-code-generator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/arduino-code-generator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How arduino-code-generator Compares
| Feature / Agent | arduino-code-generator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate Arduino/embedded C++ code snippets and patterns on demand for UNO/ESP32/RP2040. Use when users request Arduino code for sensors, actuators, communication protocols, state machines, non-blocking timers, data logging, or hardware abstraction. Generates production-ready code with proper memory management, timing patterns, and board-specific optimization. Supports DHT22, BME280, buttons, I2C/SPI, EEPROM, SD cards, WiFi, and common peripherals.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Arduino Code Generator Generate production-quality Arduino code snippets for sensors, actuators, communication, and embedded patterns. ## Quick Start **Browse example sketches:** ```bash # See 9 production-ready examples in examples/ folder ls examples/ # config-example.ino, filtering-example.ino, buttons-example.ino, # i2c-example.ino, csv-example.ino, scheduler-example.ino, # state-machine-example.ino, hardware-detection-example.ino, # data-logging-example.ino ``` **List available patterns:** ```bash uv run --no-project scripts/generate_snippet.py --list ``` **Generate code for specific pattern and board:** ```bash uv run --no-project scripts/generate_snippet.py --pattern i2c --board esp32 uv run --no-project scripts/generate_snippet.py --pattern buttons --board uno --output button.ino ``` **Interactive mode:** ```bash uv run --no-project scripts/generate_snippet.py --interactive ``` ## Resources - **examples/** - 9 production-ready example sketches (one per pattern category) - **examples/README.md** - Detailed documentation for each example with wiring diagrams - **scripts/generate_snippet.py** - CLI tool for code generation with 9 pattern templates - **assets/workflow.mmd** - Mermaid diagram of code generation workflow ## Supported Patterns ### Hardware Abstraction - Multi-board config.h with conditional compilation - Pin definitions for UNO/ESP32/RP2040 - Memory budget tracking See [patterns-config.md](references/patterns-config.md) | Example: [config-example.ino](examples/config-example.ino) ### Sensor Reading & Filtering - ADC noise reduction (moving average, median, Kalman) - DHT22, BME280, analog sensors - Data validation and calibration See [patterns-filtering.md](references/patterns-filtering.md) | Example: [filtering-example.ino](examples/filtering-example.ino) ### Input Handling - Software button debouncing - Edge detection (PRESSED/RELEASED/LONG_PRESS) - Multi-button management See [patterns-buttons.md](references/patterns-buttons.md) | Example: [buttons-example.ino](examples/buttons-example.ino) ### Communication - I2C device scanning and diagnostics - SPI configuration - UART/Serial protocols - CSV data output See [patterns-i2c.md](references/patterns-i2c.md) and [patterns-csv.md](references/patterns-csv.md) | Examples: [i2c-example.ino](examples/i2c-example.ino), [csv-example.ino](examples/csv-example.ino) ### Timing & Concurrency - Non-blocking millis() patterns - Task scheduling without delay() - Priority-based schedulers - State machines See [patterns-scheduler.md](references/patterns-scheduler.md) and [patterns-state-machine.md](references/patterns-state-machine.md) | Examples: [scheduler-example.ino](examples/scheduler-example.ino), [state-machine-example.ino](examples/state-machine-example.ino) ### Hardware Detection - Auto-detect boards (UNO/ESP32/RP2040) - SRAM usage monitoring - Sensor fallback strategies - Adaptive configuration See [patterns-hardware-detection.md](references/patterns-hardware-detection.md) | Example: [hardware-detection-example.ino](examples/hardware-detection-example.ino) ### Data Persistence - EEPROM with CRC validation - SD card FAT32 logging - Wear leveling for EEPROM - Buffered writes See [patterns-data-logging.md](references/patterns-data-logging.md) | Example: [data-logging-example.ino](examples/data-logging-example.ino) ## Code Generation Workflow - [ ] **[Identify Pattern Type](workflow/step1-identify-pattern.md)** - Analyze user request to determine core pattern category - [ ] **[Read Reference Documentation](workflow/step2-read-reference.md)** - Consult pattern-specific reference files for implementation details - [ ] **[Generate Code](workflow/step3-generate-code.md)** - Create production-ready code following quality standards - [ ] **[Provide Instructions](workflow/step4-provide-instructions.md)** - Include wiring diagrams and usage guidance - [ ] **[Mention Integration](workflow/step5-mention-integration.md)** - Suggest combinations with other patterns when relevant ## Quality Standards & Rules - [ ] **[Quality Standards](rules/quality-standards.md)** - Compilation, timing, memory safety, and error handling requirements - [ ] **[Board Optimization](rules/board-optimization.md)** - UNO, ESP32, and RP2040 specific optimizations and features - [ ] **[Common Pitfalls](rules/common-pitfalls.md)** - Critical mistakes to avoid in Arduino development ## Code Output Template - [ ] **[Code Template](templates/code-output-template.md)** - Standardized structure for generated Arduino sketches ## Resources - **examples/** - 9 production-ready example sketches (one per pattern category) - **examples/README.md** - Detailed documentation for each example with wiring diagrams - **scripts/generate_snippet.py** - CLI tool for code generation with 9 pattern templates - **assets/workflow.mmd** - Mermaid diagram of code generation workflow - **workflow/** - Step-by-step code generation process - **rules/** - Quality standards and board-specific optimizations - **templates/** - Code output templates and structure guidelines - **references/** - Detailed pattern documentation and API references
Related Skills
claude-md-generator
Automatically generates claude.md files for new folders/modules following hierarchical structure. Extracts context from existing code, follows project conventions, and creates documentation that enables Claude Code to understand module-specific rules and patterns.
checklist-generator
Generate context-aware quality checklists for code review and QA using IEEE 1028 base standards plus LLM contextual additions
card-generator
创建可下载的卡片式宣传网页/海报。当用户需要制作产品介绍卡片、教程卡片、知识科普卡片、小红书风格图文、PPT式滑动展示页时使用。支持多种预设模板(科技风、简约风、渐变风、暗黑风等),生成包含React+SVG的单HTML文件,内置ZIP打包下载功能。
canifi-skill-generator
Self-evolving skill that enables Canifi to create, install, and manage new skills autonomously
Buffer Overflow Payload Generator
Generates a buffer overflow attack payload with a specific stack layout (padding, return address, NOP sled, shellcode) and saves it to a file.
api-documentation-generator
Generate comprehensive, developer-friendly API documentation from code, including endpoints, parameters, examples, and best practices
api-docs-generator
Generate API documentation in OpenAPI/Swagger, Markdown, or Postman Collection formats. Use when documenting REST APIs, GraphQL schemas, or creating client code examples.
ai-code-generator
AI-powered code generation for boilerplate, tests, data, and scaffolding
a11y-annotation-generator
Adds accessibility annotations (ARIA labels, roles, alt text) to make web content accessible. Use when user asks to "add accessibility", "make accessible", "add aria labels", "wcag compliance", or "screen reader support".
xiaohongshu-cover-generator
小红书封面AI绘图提示词生成器。将小红书文案自动转化为Nano Banana Pro/Gemini图片生成提示词,输出内嵌API调用的交互式HTML页面。触发条件:用户说"生成小红书封面"、"小红书封面提示词"、"做小红书配图"、"小红书爆款封面"或提供小红书文案并要求生成封面图时使用。
orcaflex-model-generator
Generate OrcaFlex models from templates using component assembly with lookup tables for vessels, risers, materials, and environments.
generator
Générateur de Skill - Crée de nouveaux fichiers SKILL.md depuis les définitions YAML d'agents