A command-line assistant that turns a plain-English hardware request into an Arduino sketch, validates it against board-specific pin rules, compiles it, and uploads it to a connected microcontroller.
The project combines LLM-assisted code generation with a deterministic hardware toolchain: board detection, Arduino CLI compilation, upload strategies, serial monitoring, and local project history remain under the user's control.
- Detects supported boards through serial ports and USB VID/PID information.
- Generates complete Arduino sketches using a selected AI provider.
- Applies board-specific reserved-pin and boot-strap warnings.
- Installs required Arduino libraries and retries compilation after an AI-assisted fix.
- Supports multiple upload paths, including Arduino CLI, avrdude, esptool, UF2, DFU, and bossac.
- Produces a local HTML wiring diagram from structured wiring information.
- Saves successful sketches and metadata to a local project history.
- Supports hosted providers or a local Ollama endpoint.
flowchart LR
A["Plain-English request"] --> B["Board detection and pin rules"]
B --> C["LLM sketch generation"]
C --> D["Arduino CLI compilation"]
D -->|"Compile error"| E["Constrained repair attempt"]
E --> D
D -->|"Success"| F["Upload to board"]
F --> G["Wiring diagram and local history"]
The bundled database includes common boards from these families:
- Arduino AVR and ARM
- ESP8266 and ESP32 variants
- Raspberry Pi Pico
- STM32
- Teensy
- Adafruit Feather
- BBC micro:bit
The board database can also be refreshed from the repository, and unknown USB devices can be reviewed manually before compilation or upload.
- Groq
- OpenRouter
- Mistral AI
- OpenAI
- Anthropic
- DeepSeek or another OpenAI-compatible endpoint
- Ollama for local/offline inference
API keys are requested during setup and stored in the user's local VibeCoder configuration; no API credentials are included in this repository.
- Python 3.10 or newer
arduino-cli- Python packages listed in
requirements.txt - An API key for the selected hosted provider, or a local Ollama installation
git clone https://github.com/orfeastops/VibeCoderArduino-ai.git
cd VibeCoderArduino-ai
python -m venv .venvActivate the environment and install dependencies:
pip install -r requirements.txt
python vibecoder.pyOn first launch, VibeCoder asks you to select an AI provider and configure access. It then detects connected serial devices and guides you through board selection when automatic identification is uncertain.
[VibeCoder] > Blink the onboard LED every 500 ms and print "hello" to serial.
Generating sketch...
Compiling with the detected board profile...
Compilation successful.
Upload successful.
Wiring diagram saved locally.
Project saved to history.
| Command | Purpose |
|---|---|
history |
Show saved projects |
load 3 |
Reload a project by number |
load dht22 |
Search project history |
redeploy |
Upload the last successful sketch again |
update |
Refresh the board database |
setup |
Change provider or model |
exit |
Exit the application |
VibeCoder warns about known reserved or boot-sensitive pins and asks before replacing them. Generated code and wiring information must still be reviewed by the user before power is applied.
This is a developer/maker tool, not a substitute for electrical design review. It does not validate voltage levels, current limits, isolation, component ratings, or the physical wiring of a circuit.
vibecoder.py— command-line application and hardware workflow.boards.json— USB fingerprints and board pin rules.requirements.txt— Python runtime dependencies..github/workflows/ci.yml— syntax and data-validation checks.
- Python syntax and the bundled board database are checked in CI.
- The original prototype was tested on Linux hardware.
- Windows-specific Arduino CLI installation and serial-port paths are implemented, but broader board/OS hardware testing is ongoing.
- macOS serial detection is implemented but requires additional hardware validation.
Useful contributions include new board fingerprints, corrected pin constraints, upload-strategy fixes, and hardware test reports.
Released under the MIT License.