Velxio 2.0 – Emulate Arduino, ESP32, and Raspberry Pi 3 in the Browser (github.com)

by dmcrespo 58 comments 196 points
Read article View on HN

58 comments

[−] dmonterocrespo 49d ago
Velxio 2.0 is live.

A free, open-source emulator for 19 embedded boards: Arduino, ESP32, Raspberry Pi, RISC-V , running real compiled code in your browser.

The best part: it's fully local.

No cloud dependency. No student accounts. No data leaving your network. Self-hostable with a single Docker container.

Universities and bootcamps can deploy it on their own servers and give every student access to a complete embedded development environment, for free.

I've been working on this for over a year, and just shipped v2.0 with ESP32 emulation (via QEMU), a custom RISC-V core, and Raspberry Pi 3 support that runs real Python

[−] jdnenen 49d ago
Emulating the CPU is nice, but the trouble has always been emulating the peripherals

Does your editor do this? I tried the example but didn't see e.g. LEDs blinking

[−] dmcrespo 48d ago
Yes,peripherals are fully emulated, not just the CPU. LEDs blink, buttons respond to clicks, Serial Monitor works, servos rotate, displays render (ILI9341 TFT), and we have 48 o more components from the wokwi-elements library. The Blink example should show the built-in LED toggling on pin 13. If it didn't blink for you, it might be a compilation issue

try the example Traffic Light : Simulate a traffic light with red, yellow, and green LEDs

[−] functional_dev 48d ago
does this handle the timing differences between browser execution and real time hardware? or is it focused on logic verification?
[−] dmcrespo 49d ago
You can add peripherals There’s a “+” button on the right side of the circuit editor where you can add components like LEDs
[−] mech422 49d ago
just curious - if it runs from a docker container, what is the advantage of running the browser as opposed to just ssh'ing in ?
[−] exe34 49d ago
Is it easy to feed an elf or bin and run that (esp32c3)? I see compilation available, but I'm playing with asm and have my toolchain figured out already and would just like to emulate the firmware.
[−] mysteria 49d ago
Another +1 for this one as this is what turns this tool from a toy environment with basic sketches into something that's actually useful for larger projects with a full toolchain, libraries, and so forth.
[−] dmcrespo 49d ago
That’s exactly the direction I’m aiming for

A lot of simulators stop at simple sketches, but the goal with Velxio is to support more realistic workflows , multiple boards interacting, real toolchains, and more complex setups

Still early, but definitely moving in that direction

[−] dmcrespo 49d ago
[dead]
[−] alcor-z 49d ago
[dead]
[−] dmcrespo 49d ago
Hey HN, I posted Velxio here a while back and got great feedback. Since then I've shipped a major update

What's new in v2:

- 19 boards across 5 CPU architectures (AVR8, Xtensa, RISC-V, ARM Cortex-M0+, ARM Cortex-A53) - ESP32 emulation via QEMU (lcgamboa fork) — real flash images, ROM function emulation, GPIO/ADC/timers - ESP32-C3 and CH32V003 run on a custom RISC-V core written in TypeScript, entirely in the browser - Raspberry Pi 3B via QEMU raspi3b — boots real Pi OS, runs Python - Realistic sensor simulation: DHT22 (40-bit protocol timing), HC-SR04 (trigger/echo), WS2812B NeoPixel (GRB decoding) - 48+ electronic components from wokwi-elements

Architecture:

- AVR, RP2040, and RISC-V emulation runs client-side (avr8js, rp2040js, custom TS core) - ESP32 Xtensa and Pi 3 run on backend QEMU - Compilation via real arduino-cli - React + Vite frontend, FastAPI backend - Self-hostable via Docker, no account needed

Source: https://github.com/davidmonterocrespo24/velxio (AGPLv3)

Happy to discuss the emulation architecture — particularly the trade-offs between in-browser vs. backend QEMU emulation

[−] ehnto 49d ago
When I try to visit velxio.dev, a CrowdSec page shows up and says I am not allowed to view it. I am a pretty normal android user on firefox mobile, so that is surprising.

I look forward to trying this out though, great project!

[−] philkrylov 49d ago
Hi, adding WS2812B LED strips of arbitrary length would be awesome! Scrolling the canvas is sometimes problematic. Otherwise very interesting.
[−] radicality 49d ago
I often write a bunch of Esphome ‘code’ , which I then use with various esp32 based devices (mostly from M5stack) via esphome/HomeAssistant.

Can this project help me in any way during dev stage before uploading the code to device just to see it doesn’t work ? Eg could I use this to somehow compile&run those esphome yamls via this emulator?

[−] deringeorge2 49d ago
Really impressive - browser-based hardware emulation is a brutal WebAssembly performance problem. Curious what you're doing for the rendering layer: are the circuit visualizations on canvas/WebGL, or DOM-based? I've been hitting similar render-loop problems with a deck.gl mapping project (realtime vessel positions, thousands of points updating simultaneously) and the pattern I found that helped most was batching state updates on a fixed 2s interval before diffing the render layer - prevents the WebGL context from recomposing faster than the data actually changes meaningfully. Does Velxio have a similar throttle, or does it redraw on every emulation tick?
[−] GCUMstlyHarmls 49d ago
The container instructions has -d in it, but note that after booting the container it downloads another, I don't know, 300+mb more (its still downloading as I write), so if you can't connect that's why.

Might be better to not include -d in the instructions?

[−] hex4def6 49d ago
First of all: Awesome work! Playing with it now.

One suggestion: The main splash screen image is nearly 8MB big. It takes a noticeable time to download on my connection. I'm not sure what bandwidth costs these days, but seems like that could be something to optimize.

[−] wumms 49d ago
Nice work! One minor point for me: it wasn’t immediately clear that you need to press Compile before Play gets enabled (e.g. Arduino IDE let's you upload right away and compiles if needed)
[−] dmcrespo 49d ago
Quick update: traffic is still coming in waves, had to scale up compilation workers to keep up with demand

Things are more stable now, but still tuning performance under load

If anyone finds it useful, the source is here: https://github.com/davidmonterocrespo24/velxio

Always happy to get feedback or contributions.

[−] kaycebasques 49d ago
Can someone who has used both wokwi and this do a compare/contrast? The footer suggests that it's built on top of wokwi-elements
[−] urbandw311er 49d ago
This is a great idea. It’s always been inconvenient requiring access to the physical board just to be able to test these sort of projects.
[−] sourdoughtronic 49d ago
That looks awesome, thank you for your hard work! I would love tinker with it, but I'm not sure how to abstract things connected to those supported u_controller boards? Example, 7x16 Pico unicorn hat is driven by RP2040 PIO.
[−] pshirshov 48d ago
From what I can see, I cannot give it an ESP32-C6 firmware binary to execute, I have to compile my source code (C only) and the source has to use Arduino APIs. Under the hood it's still QEMU.
[−] varispeed 49d ago
Isn't the problem with these emulations that they are not realtime and therefore will never give true feedback? As in the simulation will unlikely to translate to real world behaviour.
[−] noahnathan25 49d ago
Pretty cool project! if you're checking it out, try one of the built-in examples and hit "Compile + Play". It runs immediately, no setup required
[−] mvkel 49d ago
This is fantastic. I am doing my first-ever consumer electronics product and this would save a lot of soldering time
[−] flymasterv 49d ago
Awesome. Is there any chance of getting MicroPython or CircuitPython support?
[−] triilman 49d ago
I like this Idea but I don't want to use this. I know what kind of prompt U using to create this one: "Create something like Wokwi and make it local"