From 16164372cf48e018ff5c2bab365edeeb22ae3521 Mon Sep 17 00:00:00 2001
From: David Montero Crespo Run a single Docker command to start a fully local instance: Then open http://localhost:3080 in your browser. Prerequisites: Node.js 18+, Python 3.12+, Open http://localhost:5173.Option 2: Self-Host with Docker
+ ghcr.io/davidmonterocrespo24/velxio:master`}
{`docker run -d \\
+ Option 3: Manual Setup (Development)
arduino-cli1. Clone the repository
-
+ {`git clone https://github.com/davidmonterocrespo24/velxio.git
-cd velxio`}2. Start the backend
-
+uvicorn app.main:app --reload --port 8001`}
{`cd backend
+ 3. Start the frontend
-
+npm run dev`}
{`cd frontend
+ 4. Set up arduino-cli (first time)
-
+arduino-cli core install rp2040:rp2040`}
{`arduino-cli core update-index
+ Your First Simulation
@@ -224,7 +224,7 @@ arduino-cli core install rp2040:rp2040`}
-
+}`}
{`void setup() {
+
arduino-cli and returns a .hex file.
{`User Code (Monaco Editor)
+ {`User Code (Monaco Editor)
│
▼
Zustand Store (useEditorStore)
@@ -296,7 +296,7 @@ const EmulatorSection: React.FC = () => (
Port listeners (PORTB / PORTC / PORTD)
│
▼
- PinManager ──► Component state ──► React re-renders`}
+ PinManager ──► Component state ──► React re-renders`}
@@ -306,8 +306,8 @@ const EmulatorSection: React.FC = () => (
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`}
+ {`import { CPU, avrInstruction, AVRTimer, AVRUSART, AVRADC, AVRIOPort } from 'avr8js';
+ {`import { CPU, avrInstruction, AVRTimer, AVRUSART, AVRADC, AVRIOPort } from 'avr8js';
const cpu = new CPU(programMemory); // ATmega328p at 16 MHz
const portB = new AVRIOPort(cpu, portBConfig); // digital pins 8-13
@@ -751,7 +751,7 @@ function runFrame() {
cpu.tick(); // advance timers + peripherals
}
requestAnimationFrame(runFrame);
-}`}
+}`}
{`cd backend
-python mcp_server.py`}
+ Claude Desktop config (~/.claude/claude_desktop_config.json):
{`{
+ {`{
"mcpServers": {
"velxio": {
"command": "python",
"args": ["/absolute/path/to/velxio/backend/mcp_server.py"]
}
}
-}`}
+}`}
{`cd backend
-python mcp_sse_server.py --port 8002`}
+ MCP client config:
-{`{
+ {`{
"mcpServers": {
"velxio": { "url": "http://localhost:8002/sse" }
}
-}`}
+}`}
Velxio circuits are plain JSON objects:
-{`{
+ {`{
"board_fqbn": "arduino:avr:uno",
"version": 1,
"components": [
@@ -832,7 +832,7 @@ python mcp_sse_server.py --port 8002`}
{ "from_part": "uno", "from_pin": "13",
"to_part": "led1", "to_pin": "A", "color": "green" }
]
-}`}
+}`}
{`// Step 1 — Create a circuit
+ {`// Step 1 — Create a circuit
{
"tool": "create_circuit",
"arguments": {
@@ -892,10 +892,10 @@ python mcp_sse_server.py --port 8002`}
],
"board": "arduino:avr:uno"
}
-}`}
+}`}
{`cd backend
+ {`cd backend
pip install -r requirements.txt
# Ensure arduino-cli is installed
@@ -904,7 +904,7 @@ arduino-cli core update-index
arduino-cli core install arduino:avr
# Run tests
-python -m pytest tests/test_mcp_tools.py -v`}
+python -m pytest tests/test_mcp_tools.py -v`}
{`/home/pi/
+ {`/home/pi/
├── script.py ← user's main Python script
└── lib/
- └── helper.py ← optional helper library`}
+ └── helper.py ← optional helper library`}