2.9 KiB
2.9 KiB
Getting Started
Velxio is an open-source Arduino emulator that runs entirely in your browser. Follow these steps to simulate your first Arduino sketch.
Option 1: Use the Hosted Version
No installation needed — go to https://velxio.dev and start coding immediately.
Option 2: Self-Host with Docker
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.
Option 3: Manual Setup (Development)
Prerequisites: Node.js 18+, Python 3.12+, arduino-cli
1. Clone the repository
git clone https://github.com/davidmonterocrespo24/velxio.git
cd velxio
2. Start the backend
cd backend
python -m venv venv && source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8001
3. Start the frontend
# In a new terminal:
cd frontend
npm install
npm run dev
Open http://localhost:5173.
4. Set up arduino-cli (first time)
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
Your First Simulation
- Open the editor at velxio.dev/editor (or your local instance).
- Select a board from the toolbar (e.g., Arduino Uno).
- Write Arduino code in the Monaco editor, for example:
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
}
- Click Compile — the backend calls
arduino-cliand returns a.hexfile. - Click Run — the AVR8 emulator executes the compiled program.
- Add components using the component picker (click the + button on the canvas).
- Connect wires by clicking a component pin and then another pin.
Loading an Example Project
- Click Examples in the navigation bar.
- Choose a project such as Blink, Traffic Light, or LCD 20×4.
- Click Load — the code and components are imported automatically.
- Click Run to start the simulation.
Troubleshooting
| 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. |