2026-03-07 08:12:50 +07:00
# Velxio — Arduino Emulator
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
**Live at [velxio.dev ](https://velxio.dev )**
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
A fully local, open-source Arduino emulator. Write Arduino code, compile it, and simulate it with real AVR8 CPU emulation and 48+ interactive electronic components — all running in your browser.
2026-03-04 08:25:52 +07:00
2026-03-07 08:12:50 +07:00
[](https://velxio.dev)
[](https://github.com/davidmonterocrespo24/velxio/pkgs/container/velxio)
[](https://github.com/davidmonterocrespo24/velxio/stargazers)
[](LICENSE)
2026-03-04 08:25:52 +07:00
2026-03-07 08:12:50 +07:00
[](https://github.com/sponsors/davidmonterocrespo24)
[](https://paypal.me/odoonext)
2026-03-04 08:25:52 +07:00
2026-03-07 08:12:50 +07:00
---
## Try it now
**[https://velxio.dev](https://velxio.dev)** — no installation needed. Open the editor, write your sketch, and simulate directly in the browser.
To self-host with Docker (single command):
```bash
docker run -d -p 3080:80 ghcr.io/davidmonterocrespo24/velxio:master
```
Then open **http://localhost:3080** .
---
2026-03-04 08:25:52 +07:00
2026-03-04 07:14:01 +07:00
## Screenshots
2026-03-06 07:33:02 +07:00

2026-03-04 07:14:01 +07:00
2026-03-06 07:33:02 +07:00
Raspberry Pi Pico simulation — ADC read test with two potentiometers, Serial Monitor showing live output, and compilation console at the bottom.
2026-03-04 07:14:01 +07:00
2026-03-06 07:33:02 +07:00

2026-03-04 07:14:01 +07:00
2026-03-06 07:33:02 +07:00
Arduino Uno driving an ILI9341 240× 320 TFT display via SPI — rendering a real-time graphics demo using Adafruit_GFX + Adafruit_ILI9341.

Library Manager loads the full Arduino library index on open — browse and install libraries without typing first.

2026-03-07 08:12:50 +07:00
Component Picker showing 48 available components with visual previews, search, and category filters.
---
2026-03-04 07:14:01 +07:00
2026-03-05 04:27:14 +07:00
## Features
### Code Editing
2026-03-05 05:16:00 +07:00
- **Monaco Editor** — Full C++ editor with syntax highlighting, autocomplete, minimap, and dark theme
2026-03-07 08:12:50 +07:00
- **Multi-file workspace** — create, rename, delete, and switch between multiple `.ino` / `.h` / `.cpp` files
2026-03-06 07:33:02 +07:00
- **Arduino compilation** via `arduino-cli` backend — compile sketches to `.hex` / `.uf2` files
2026-03-05 05:16:00 +07:00
- **Compile / Run / Stop / Reset** toolbar buttons with status messages
2026-03-07 08:12:50 +07:00
- **Compilation console** — resizable output panel showing full compiler output, warnings, and errors
2026-03-06 07:33:02 +07:00
### Multi-Board Support
- **Arduino Uno** (ATmega328p) — full AVR8 emulation via avr8js
2026-03-07 08:12:50 +07:00
- **Arduino Nano** (ATmega328p) — full AVR8 emulation
- **Arduino Mega** (ATmega2560) — full AVR8 emulation
2026-03-06 07:33:02 +07:00
- **Raspberry Pi Pico** (RP2040) — full RP2040 emulation via rp2040js, compiled with arduino-pico core
- Board selector in the toolbar — switch boards without restarting
2026-03-05 04:27:14 +07:00
2026-03-07 08:12:50 +07:00
### AVR8 Simulation (Arduino Uno / Nano / Mega)
2026-03-05 05:16:00 +07:00
- **Real ATmega328p emulation** at 16 MHz using avr8js
- **Full GPIO support** — PORTB (pins 8-13), PORTC (A0-A5), PORTD (pins 0-7)
2026-03-07 08:12:50 +07:00
- **Timer0/Timer1/Timer2** peripheral support (`millis()`, `delay()` , PWM via `analogWrite()` )
2026-03-06 07:33:02 +07:00
- **USART (Serial)** — full transmit and receive support
- **ADC** — `analogRead()` on pins A0-A5, voltage injection from UI components
- **SPI** — hardware SPI peripheral (enables ILI9341, SD card, etc.)
2026-03-07 08:12:50 +07:00
- **I2C (TWI)** — hardware I2C with virtual device bus
- **~60 FPS simulation loop** with `requestAnimationFrame`
2026-03-06 07:33:02 +07:00
### RP2040 Simulation (Raspberry Pi Pico)
- **Real RP2040 emulation** via rp2040js at 133 MHz
2026-03-07 08:12:50 +07:00
- **UART0** serial output displayed in Serial Monitor
2026-03-06 07:33:02 +07:00
- **ADC** — 12-bit, 3.3V reference on GPIO 26-29 (A0-A3)
### Serial Monitor
2026-03-07 08:12:50 +07:00
- **Live serial output** — characters as the sketch sends them via `Serial.print()`
- **Auto baud-rate detection** — reads hardware registers, no manual configuration needed
2026-03-06 07:33:02 +07:00
- **Send data** to the Arduino RX pin from the UI
- **Autoscroll** with toggle
2026-03-05 04:27:14 +07:00
### Component System (48+ Components)
2026-03-07 08:12:50 +07:00
- **48 electronic components** from wokwi-elements
- **Component picker** with search, category filters, and live previews
- **Drag-and-drop** repositioning on the simulation canvas
2026-03-05 05:16:00 +07:00
- **Component rotation** in 90° increments
2026-03-07 08:12:50 +07:00
- **Property dialog** — pin roles, Arduino pin assignment, rotate & delete
2026-03-05 04:27:14 +07:00
### Wire System
2026-03-05 05:16:00 +07:00
- **Wire creation** — click a pin to start, click another pin to connect
2026-03-07 08:12:50 +07:00
- **Orthogonal routing** — no diagonal paths
2026-03-05 05:16:00 +07:00
- **8 signal-type wire colors**: Red (VCC), Black (GND), Blue (Analog), Green (Digital), Purple (PWM), Gold (I2C), Orange (SPI), Cyan (USART)
2026-03-07 08:12:50 +07:00
- **Segment-based wire editing** — drag segments perpendicular to their orientation
2026-03-05 04:27:14 +07:00
2026-03-06 07:33:02 +07:00
### Library Manager
2026-03-07 08:12:50 +07:00
- Browse and install the full Arduino library index directly from the UI
- Live search, installed tab, version display
### Auth & Project Persistence
- **Email/password** and **Google OAuth** sign-in
- **Project save** with name, description, and public/private visibility
- **Project URL** — each project gets a permanent URL at `/project/:id`
- **Sketch files stored on disk** per project (accessible from the host via Docker volume)
- **User profile** at `/:username` showing public projects
2026-03-06 07:33:02 +07:00
2026-03-05 04:27:14 +07:00
### Example Projects
2026-03-07 08:12:50 +07:00
- 8 built-in examples (Blink, Traffic Light, Button Control, Fade LED, Serial Hello World, RGB LED, Simon Says, LCD 20× 4)
- One-click loading into the editor
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
---
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
## Self-Hosting
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
### Option A: Docker (single container, recommended)
2026-03-03 10:20:49 +07:00
2026-03-06 07:33:02 +07:00
```bash
2026-03-07 08:12:50 +07:00
# Pull and run
docker run -d \
--name velxio \
-p 3080:80 \
-v $(pwd)/data:/app/data \
ghcr.io/davidmonterocrespo24/velxio:master
2026-03-06 07:33:02 +07:00
```
2026-03-07 08:12:50 +07:00
Open **http://localhost:3080** .
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
The `/app/data` volume contains:
- `velxio.db` — SQLite database (users, projects metadata)
- `projects/{id}/` — sketch files per project
2026-03-05 05:28:33 +07:00
2026-03-07 08:12:50 +07:00
### Option B: Docker Compose
2026-03-05 05:28:33 +07:00
```bash
2026-03-07 00:29:15 +07:00
git clone https://github.com/davidmonterocrespo24/velxio.git
cd velxio
2026-03-07 08:12:50 +07:00
cp backend/.env.example backend/.env # edit as needed
docker compose -f docker-compose.prod.yml up -d
2026-03-05 05:28:33 +07:00
```
2026-03-07 08:12:50 +07:00
#### Environment variables (`backend/.env`)
2026-03-05 05:28:33 +07:00
2026-03-07 08:12:50 +07:00
| Variable | Default | Description |
|---|---|---|
| `SECRET_KEY` | *(required)* | JWT signing secret |
| `DATABASE_URL` | `sqlite+aiosqlite:////app/data/velxio.db` | SQLite path |
| `DATA_DIR` | `/app/data` | Directory for project files |
| `FRONTEND_URL` | `http://localhost:5173` | Used for OAuth redirect |
| `GOOGLE_CLIENT_ID` | — | Google OAuth client ID |
| `GOOGLE_CLIENT_SECRET` | — | Google OAuth client secret |
| `GOOGLE_REDIRECT_URI` | `http://localhost:8001/api/auth/google/callback` | Must match Google Console |
| `COOKIE_SECURE` | `false` | Set `true` when serving over HTTPS |
2026-03-05 05:28:33 +07:00
2026-03-07 08:12:50 +07:00
### Option C: Manual Setup
2026-03-05 05:28:33 +07:00
2026-03-07 08:12:50 +07:00
**Prerequisites:** Node.js 18+, Python 3.12+, arduino-cli
2026-03-05 05:28:33 +07:00
2026-03-03 10:20:49 +07:00
```bash
2026-03-07 00:29:15 +07:00
git clone https://github.com/davidmonterocrespo24/velxio.git
cd velxio
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
# Backend
2026-03-03 10:20:49 +07:00
cd backend
2026-03-07 08:12:50 +07:00
python -m venv venv && source venv/bin/activate # Windows: venv\Scripts\activate
2026-03-03 10:20:49 +07:00
pip install -r requirements.txt
2026-03-07 08:12:50 +07:00
uvicorn app.main:app --reload --port 8001
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
# Frontend (new terminal)
2026-03-03 10:20:49 +07:00
cd frontend
npm install
2026-03-07 08:12:50 +07:00
npm run dev
2026-03-03 10:20:49 +07:00
```
2026-03-07 08:12:50 +07:00
Open **http://localhost:5173** .
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
**arduino-cli setup (first time):**
2026-03-03 10:20:49 +07:00
```bash
2026-03-07 08:12:50 +07:00
arduino-cli core update-index
arduino-cli core install arduino:avr
# For Raspberry Pi Pico:
arduino-cli config add board_manager.additional_urls \
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
arduino-cli core install rp2040:rp2040
2026-03-03 10:20:49 +07:00
```
2026-03-07 08:12:50 +07:00
---
2026-03-03 10:20:49 +07:00
2026-03-04 06:18:37 +07:00
## Project Structure
2026-03-03 10:20:49 +07:00
```
2026-03-07 00:29:15 +07:00
velxio/
2026-03-07 08:12:50 +07:00
├── frontend/ # React + Vite + TypeScript
│ └── src/
│ ├── pages/ # LandingPage, EditorPage, ProjectByIdPage, ...
│ ├── components/ # Editor, simulator canvas, modals, layout
│ ├── simulation/ # AVRSimulator, RP2040Simulator, PinManager
│ ├── store/ # Zustand stores (auth, editor, simulator, project)
│ └── services/ # API clients
├── backend/ # FastAPI + Python
2026-03-05 04:27:14 +07:00
│ └── app/
2026-03-07 08:12:50 +07:00
│ ├── api/routes/ # compile, auth, projects, libraries
│ ├── models/ # User, Project (SQLAlchemy)
│ ├── services/ # arduino_cli, project_files
│ └── core/ # config, security, dependencies
├── wokwi-libs/ # Local clones of Wokwi repos
│ ├── wokwi-elements/
│ ├── avr8js/
│ └── rp2040js/
├── deploy/ # nginx.conf, entrypoint.sh
├── Dockerfile.standalone # Single-container production image
├── docker-compose.yml # Development compose
└── docker-compose.prod.yml # Production compose
2026-03-03 10:20:49 +07:00
```
2026-03-07 08:12:50 +07:00
---
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
## Technologies
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
| Layer | Stack |
|---|---|
| Frontend | React 19, Vite 7, TypeScript 5.9, Monaco Editor, Zustand, React Router 7 |
| Backend | FastAPI, SQLAlchemy 2.0 async, aiosqlite, uvicorn |
| Simulation | avr8js (AVR8), rp2040js (RP2040), wokwi-elements (Web Components) |
| Compiler | arduino-cli (subprocess) |
| Auth | JWT (httpOnly cookie), Google OAuth 2.0 |
| Persistence | SQLite + disk volume (`/app/data/projects/{id}/`) |
| Deploy | Docker, nginx, GitHub Actions → GHCR + Docker Hub |
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
---
2026-03-03 10:20:49 +07:00
2026-03-04 06:18:37 +07:00
## Troubleshooting
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
**`arduino-cli: command not found`** — install arduino-cli and add to PATH.
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
**LED doesn't blink** — check port listeners in browser console; verify pin mapping in the component property dialog.
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
**Serial Monitor shows nothing** — ensure `Serial.begin()` is called before `Serial.print()` .
2026-03-05 04:27:14 +07:00
2026-03-07 08:12:50 +07:00
**Compilation errors** — check the compilation console; verify the correct core is installed.
2026-03-05 04:27:14 +07:00
2026-03-07 08:12:50 +07:00
---
2026-03-06 07:33:02 +07:00
2026-03-04 06:18:37 +07:00
## Contributing
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
Suggestions, bug reports, and pull requests are welcome at [github.com/davidmonterocrespo24/velxio ](https://github.com/davidmonterocrespo24/velxio ).
2026-03-03 10:20:49 +07:00
2026-03-04 06:18:37 +07:00
## License
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
MIT — see [LICENSE ](LICENSE ).
2026-03-03 10:20:49 +07:00
2026-03-04 06:18:37 +07:00
## References
2026-03-03 10:20:49 +07:00
2026-03-07 08:12:50 +07:00
- [Wokwi ](https://wokwi.com ) — Inspiration
2026-03-05 04:27:14 +07:00
- [avr8js ](https://github.com/wokwi/avr8js ) — AVR8 emulator
- [wokwi-elements ](https://github.com/wokwi/wokwi-elements ) — Electronic web components
2026-03-06 07:33:02 +07:00
- [rp2040js ](https://github.com/wokwi/rp2040js ) — RP2040 emulator
2026-03-05 04:27:14 +07:00
- [arduino-cli ](https://github.com/arduino/arduino-cli ) — Arduino compiler
- [Monaco Editor ](https://microsoft.github.io/monaco-editor/ ) — Code editor