+ Velxio is a fully local, open-source Arduino emulator that runs entirely in your browser.
+ Write Arduino C++ code, compile it with a real arduino-cli backend, and simulate it using
+ true AVR8 / RP2040 CPU emulation — with 48+ interactive electronic components, all without installing
+ any software on your machine.
+
| Board | CPU | Emulator |
|---|---|---|
| Arduino Uno | ATmega328p @ 16 MHz | avr8js |
| Arduino Nano | ATmega328p @ 16 MHz | avr8js |
| Arduino Mega | ATmega2560 @ 16 MHz | avr8js |
| Raspberry Pi Pico | RP2040 @ 133 MHz | rp2040js |
Follow these steps to simulate your first Arduino sketch.
+ ++ No installation needed — go to{' '} + https://velxio.dev{' '} + and start coding immediately. +
+ +Run a single Docker command to start a fully local instance:
+{`docker run -d \\
+ --name velxio \\
+ -p 3080:80 \\
+ -v $(pwd)/data:/app/data \\
+ ghcr.io/davidmonterocrespo24/velxio:master`}
+ Then open http://localhost:3080 in your browser.
+ +Prerequisites: Node.js 18+, Python 3.12+, arduino-cli
{`git clone https://github.com/davidmonterocrespo24/velxio.git
+cd velxio`}
+
+ {`cd backend
+python -m venv venv && source venv/bin/activate
+pip install -r requirements.txt
+uvicorn app.main:app --reload --port 8001`}
+
+ {`cd frontend
+npm install
+npm run dev`}
+ Open http://localhost:5173.
+ +{`arduino-cli core update-index
+arduino-cli core install arduino:avr
+
+# For Raspberry Pi Pico support:
+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`}
+
+ {`void setup() {
+ pinMode(13, OUTPUT);
+}
+
+void loop() {
+ digitalWrite(13, HIGH);
+ delay(500);
+ digitalWrite(13, LOW);
+ delay(500);
+}`}
+ arduino-cli and returns a .hex file.| Problem | Solution |
|---|---|
arduino-cli: command not found |
+ Install arduino-cli and add it to your PATH. |
+
| LED doesn't blink | +Check the browser console for port listener errors; verify pin assignment in the component property dialog. | +
| Serial Monitor is empty | +Ensure Serial.begin() is called inside setup() before any Serial.print(). |
+
| Compilation errors | +Check the compilation console at the bottom of the editor for full arduino-cli output. |
+
+ Velxio uses real CPU emulation rather than a simplified model. + This document describes how each layer of the simulation works. +
+ +{`User Code (Monaco Editor)
+ │
+ ▼
+ Zustand Store (useEditorStore)
+ │
+ ▼
+ FastAPI Backend ──► arduino-cli ──► .hex / .uf2 file
+ │
+ ▼
+ AVRSimulator / RP2040Simulator
+ │ loadHex()
+ ▼
+ CPU execution loop (~60 FPS via requestAnimationFrame)
+ │
+ ▼
+ Port listeners (PORTB / PORTC / PORTD)
+ │
+ ▼
+ PinManager ──► Component state ──► React re-renders`}
+
+ + The AVR backend uses avr8js, + which implements a complete ATmega328p / ATmega2560 processor. +
+ +Each animation frame executes approximately 267,000 CPU cycles (16 MHz ÷ 60 FPS):
+{`avrInstruction(cpu); // decode and execute one AVR instruction
+cpu.tick(); // advance peripheral timers and counters`}
+
+ | Peripheral | Details |
|---|---|
| GPIO | PORTB (pins 8–13), PORTC (A0–A5), PORTD (pins 0–7) |
| Timer0 / Timer1 / Timer2 | millis(), delay(), PWM via analogWrite() |
| USART | Full transmit and receive — powers the Serial Monitor |
| ADC | 10-bit, 5 V reference on pins A0–A5 |
| SPI | Hardware SPI (enables ILI9341, SD card, etc.) |
| I2C (TWI) | Hardware I2C with virtual device bus |
| Arduino Pin | AVR Port | Bit |
|---|---|---|
| 0–7 | PORTD | 0–7 |
| 8–13 | PORTB | 0–5 |
| A0–A5 | PORTC | 0–5 |
+ The RP2040 backend uses rp2040js. +
+Arduino compilation produces Intel HEX format. The parser in hexParser.ts:
:Uint8Array of program bytesAVRSimulator converts this to a Uint16Array (16-bit words, little-endian)| File | Purpose |
|---|---|
frontend/src/simulation/AVRSimulator.ts | AVR8 CPU emulator wrapper |
frontend/src/simulation/PinManager.ts | Maps Arduino pins to UI components |
frontend/src/utils/hexParser.ts | Intel HEX parser |
frontend/src/components/simulator/SimulatorCanvas.tsx | Canvas rendering |
backend/app/services/arduino_cli.py | arduino-cli wrapper |
backend/app/api/routes/compile.py | Compilation API endpoint |
+ Velxio ships with 48+ interactive electronic components powered by{' '} + wokwi-elements. + All components can be placed on the simulation canvas, connected with wires, and interact with your Arduino sketch in real time. +
+ +| Color | Signal Type |
|---|---|
| Red | VCC (power) |
| Black | GND (ground) |
| Blue | Analog |
| Green | Digital |
| Purple | PWM |
| Gold | I2C (SDA/SCL) |
| Orange | SPI (MOSI/MISO/SCK) |
| Cyan | USART (TX/RX) |
| Component | Description |
|---|---|
| LED | Single LED with configurable color |
| RGB LED | Three-color LED (red, green, blue channels) |
| 7-Segment Display | Single digit numeric display |
| LCD 16×2 | 2-line character LCD (I2C or parallel) |
| LCD 20×4 | 4-line character LCD |
| ILI9341 TFT | 240×320 color TFT display (SPI) |
| Buzzer | Passive piezo buzzer |
| NeoPixel | Individually addressable RGB LED strip |
| Component | Description |
|---|---|
| Push Button | Momentary push button |
| Slide Switch | SPDT slide switch |
| Potentiometer | Analog voltage divider (ADC input) |
| Rotary Encoder | Incremental rotary encoder |
| Keypad 4×4 | 16-button matrix keypad |
| Joystick | Dual-axis analog joystick |
| Component | Description |
|---|---|
| HC-SR04 | Ultrasonic distance sensor |
| DHT22 | Temperature and humidity sensor |
| PIR Motion | Passive infrared motion sensor |
| Photoresistor | Light-dependent resistor (LDR) |
| IR Receiver | 38 kHz infrared receiver |
| Component | Description |
|---|---|
| Resistor | Standard resistor (configurable value) |
| Capacitor | Electrolytic capacitor |
| Inductor | Coil inductor |
Each component has a Property Dialog accessible by clicking it on the canvas:
+| Property | Description |
|---|---|
| Arduino Pin | The digital or analog pin this component is connected to |
| Color | Visual color (LEDs, wires) |
| Value | Component value (e.g., resistance in Ω) |
| Rotation | Rotate in 90° increments |
| Delete | Remove the component from the canvas |
Features that are implemented, in progress, and planned for future releases of Velxio.
+ +arduino-cli (multi-file sketch support).zip filesmain