Show HN: Esp32sim – Run ESP32 firmware in the browser
github.comHi HN,
I’ve been working on esp32sim, an open-source ESP32 emulator that runs in the browser.
The fun part of the demo is that there is no ESP32 involved — the firmware is executing in the emulator.
The goal is to make ESP32 software easier to experiment with, test and simulate without always needing physical hardware connected.
Source: https://github.com/mikroverk/esp32sim
I made a short video showing it in action: https://youtu.be/waoWFilTWEc
I’m particularly interested in feedback from embedded developers: what would an emulator like this need to support before you’d actually use it for development, testing or CI?
I wonder if this can be used with WLED to preview effects and other configurations before running on a live device?
Only if the emulator emulates the timings faithfully; Also it probably needs to emulate the dma/rmt subsystem at a timing level.
Vaguely related, I recently designed a ws28x emulator (a physical device with support upto 1024*4 led stripes) to test firmware of our own devices. Ill probably make it oss when we release our system.
We're building an esp-32 based hardware golf product.
Esp32 emulation in the browser is an incredible superpower for hardware manufacturers.
You can put your hardware product, with a pixel perfect display and sound, directly into users (virtual) hands so they can try before they buy.
There's no real cost to you, since their web browser and computer provide all the horse power, you just serve it up as a static web page.
In the age of AI, a moat for hardware companies can be network effects through providing an AI friendly base that your users/players can build on.
For us that takes the form of an open source app store where players can extend their device using AI ("Hey Claude, make me a game like this one, except that a giant bowling ball with our company logo embossed on it should drop and roll down an Indiana Jones styled marble run").
It's hard to overstate how powerful it is to have users trying your device, navigating the menus, extending it's functionality themselves with AI, all on their own computer, creating games for others, all without even buying your device.
A fantastic project. I've used velxio.dev it also runs in a browser with ESP32 and other microcontroller emulation, circuit simulation, and AI-assisted development
Very cool, that was something I was looking into very recently.
I vibe coded a drone simulator that flys drones by simulating ESP32 in the browser where the actual flight controller C code that runs on real ESP32 is running as WebAssembly: https://mrtksn.github.io/liftlab/
So the drones are flying with the actual ESP32 flight controller and you can flash the real ESP32 board directly.
Cool - so you also did a ESP32 emulator?
My work isn't as nearly as impressive as yours, I have some ESP32 boards and a Pi at hand and wanted to build a drone that adapts to different geometries and motors of inconsistent specs so I built this realistic as possible drone simulator that also simulates the boards alongside with the radio, battery, sensors and motors inside a physics simulator. The code that runs in the real boards is executed as a WebAssembly so it behaves exactly the same as it receives simulated sensor data.
The Pi board is intended for navigation and more complex tasks and is able to update the ESP32 flight controller even mid-flight.
Outstanding! Very cool.
On a lot of IoT projects, it's easier to create a "functional" software simulator for the hardware part so the mobile and cloud people can get going without having to wait for test hardware. Those simulators work at the level of emulating BLE or WiFi/API commands. Once you have hardware, the simulators are only used in CI/CD testing.
Where I can see this coming handy is instead of a "functional simulator" to actually have real firmware running for each mobile or back-end dev and CI/CD runner.
Yes, it is also very very useful when doing agentic coding of ESP32 software - no messing with HW until you have something that works reasonably well already. So less time spent flashing.
The challenge is is getting the peripherals emulation detailed enough to be useful - and in reality it'll never be good enough to completely replace physical hardware because you're trying to clone a buggy black box whose API is only vaguely documented.
But if it's just an approximation anyways, why not save yourself an awful lot of time and emulate the HAL a few layers up for the 95% of logic which doesn't require the actual hardware?
Just like in software, your cloud web app doesn't need a cycle-accurate emulation of the entire Amazon cloud. Mocking a few REST calls is often more than enough, and in practice mocking the SDK API has basically the same result.
This is the first thing I started looking for when I started gathering ESP32s. I will definitely be checking this out! My main thought for it was experimenting with Meshtastic firmware without potentially bricking one of my devices.
Any plans to support H2?
This is awesome, I will certainly use it for some of my recent embedded work. Will try and contribute back as well.
This emulator is actually pretty cool — especially since it’s based on an ESP32; you can do all sorts of neat things with it, even simple ones:)
Very nice! Are you planning P4 support? Have lots of S3 units and some C6, but P4 are the ones getting the most attentation at the moment.
Yes, it is in the plan - but I need to get some P4s also. Likely within a few weeks it should be there.
This is huge! I love the idea of this and I’ve been frustrated by the solutions offered earlier.
Thanks!
I actually want to have a play with this sometime. But honestly, these gigantic, poorly-formatted AI-slop paragraphs like the one below this heading…
https://github.com/mikroverk/esp32sim#boards-esp32-s3
… are just too much with their dense mix of formatting, brackets, semantic punctuation, command line arguments and part numbers etc. (This one is particularly absurd but it's not the only one).
I may be middle-aged now and a non-expert but I am pretty sure these things are generally exhausting to even expert young readers. I would urge you to reconsider how this page is presented.
I can tell that a README.md becomes a DONTREADME.md when its contents are:
It is one that I am not going to read and not even the author read it themselves either.
It’s also a predictor of the level of slop in a project since it is getting worse with the people talking about “code quality” have now vanished and are no where to be found.
True... Will take a pass - we are planning a 0.3.0. release I guess that is when we also should make it possible for humans to read the README and not only for agents...
#this-should-have-been-a-table.
Yes, I can agree - no one can read the docs anymore - too long and to messy. Will consider taking a pass on that soon. Thanks for the feedback! I did not really expect this level of interest when I started - just to avoid carrying all esp32 devices all the time - for demoing...
One weekend, on a branch that isn't merged, I built a rudimentary SDL-based simulator for (InkHUD) ePaper GUI development that works on x86 without ESP32 emulation because Meshtastic compiles for x86, too. https://github.com/westurner/firmware/commits/add_weather_ht...
The SPI display driver that records screencasts to MAV (Mu Animation Video) format - just like a fax - might be useful.
In another project, teact.sim, I've developed another similarly limited simulator for eZ80 and Python but we don't need to emulate the ARM processor because Python works on x86. So we emulate the ez80 in plain Python; and someday that might compile to WASM with Pyodide.
IIRC there's Qemu in WASM. Would ESP32 work in Qemu in WASM? Is this faster?
"Babe32 – Barely Adequate Browser ESP32" https://news.ycombinator.com/item?id=49104559
Is there one for RP2350?
Not in esp32sim - but I also happen to have Cooja-NG there we do have both RISC-V + ARM Cortex M33 - so it would not be hopeless to get that emulated.
It would be great fun.
How is this different from Wokwi.com? They’ve been doing for years, and have a large number of microcontrollers emulated.
This one is vibecoded
Yes, we all use better tools than writing in plain assembly these days. I am super happy that tools get better all the time... Worst time was entering DATA on C64... to do fast code (for me at least). Now life is better ;-)
Clickable link: https://wokwi.com/
OSS and the price? It may be vibe coded but the price is free.
yes, and this make your cool esp32 software demoable on GitHub pages for free!
I will push back against this broad class of question (critisism?), as it could be applied to the large majority of creations people making, exluding a minority of truly novel things, and outright clones.
For a relevant example, look at Show HN: You could make this same post with a slight variation on every one of them.
It's a vibecoded project, so isn't it more like a creation of Claude? I think it's quite relevant to see where/if the clanker improved on the existing product.
It’s not a criticism. The creators of these projects have most likely shopped around and used existing projects before deciding to build their own. I’m as interested in the “why” they built something as much as the project itself. Unfortunately, with LLMs, it looks like writing and communication skills have taken a hit.
No, it's just that meaningful answers to "why" are hard to come by when you might only have twenty minutes invested.
In 2027, I can assure you I won't be shopping around for existing projects very often.
For starters, I don't need them. Second, it might take me longer to learn theirs than to build my own. And last, the amount of slop getting pushed out is going through the roof, making discoverability a difficult problem already.
I have tried to use wokwi several times and I ran into roadblocks trying to do what I want with it. They want you to pay and that’s limiting. I get trying to extract value for your work. But I love the idea an OSS solution you can do whatever you want with.
yes, and if you get stuck - post and issue or even a PR!
Wokwi is SaaS emulator with a monthly cost - I need to have a tool for my own vibe coding of new ESP32 software - this is the tool I needed - and it turned out quite ok. Free for all, free forever is the plan. I'd call it developed by emulator developers using Claude - not "vibe" but partly spec-driven partly "vibed". It is fantastic to not need to read tons of specifications as Claude is doing that while developing but you still need to know what you are doing... (I have developed emulators quite a while... starting around mid 90s).
so cool!!
AI slop