The Arduino IDE usually requires a physical board, which can be cumbersome. For example in a classroom setting: holding up an Arduino board showing the entire class a LED blinking is not very doable. This is where Wasmino can be used. Wasmino can also be used as a stop-gap during the first few classes, giving students time to purchase an actual Arduino board. Other solutions exist such as 123D Circuits. Wasmino is different as it is integrated with the Arduino IDE, providing a seamless experience - using Wasmino is just like using an actual Arduino board. Migrating to a physical board is also as simple as selecting another board in the Arduino IDE. I believe this is valuable in a classroom setting. Wasmino is also open-source, while most alternative solutions are not.
Needless to say, this project is in a very early stage - feedbacks welcome. Also if you can think of other use cases, let me know!
I'm one of the developers of https://github.com/keyboardio/Kaleidoscope - We've ended up putting together a 'virtual' Arduino core (https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio...) that compiles to native code, so that we can run a simulator and test suites with gtest and gmock. (https://github.com/keyboardio/Kaleidoscope/tree/master/testi... / https://github.com/keyboardio/Kaleidoscope/runs/1632368671?c... ) It's super-useful, but a browser-based sim might be even better for this.
> The Arduino IDE usually requires a physical board, which can be cumbersome.
But this is the part that makes me a bit uncomfortable. One reason I got into Arduinos a few years ago was that I felt I was getting entirely detached from interacting with any physical aspects of engineering, and learning that, however clumsily (including occasionally burning my fingertips or destroying an unfortunate LED or capacitor) was an interesting part of electronics.
I feel that taking the whole experience virtual is sort of missing the point (Like teaching driving instructions classes in GTA ;-), and as a software engineer, I constantly tried to resist the inner urge to pull every project back into a software direction (No, the project does not need to run an OS, or run on a GHz clocked CPU, or need a ton of storage…).
There’s also some similar work here: https://github.com/wokwi/avr8js although this does not use wasm, rather it emulates the AVR instructions from the built hex object.
It included analogRead() and Serial functionality; maybe it can give you some ideas regarding the UI.
Here's the source: https://github.com/dpengineering/giffer-reborn
And you can try it here: https://dpengineering.github.io/giffer-reborn/
A side project of mine that has become more serious last year is quite similar (https://www.studiotechnix.com/). My tool has the same caveats as Wasmino in that the CPU is modelled as "infinitely fast" and only "time functions" progress time. It is inherent to the method of simulating software coupled to physical models of hardware. Even with these assumptions, simulation can uncover a lot of functional faults / logic reasoning flaws in the embedded application. Testing on real hardware is of course still needed, but iterating on your design in simulation is much faster than on the real hardware. And it provides an easy way towards test automation which is much harder to setup with real hardware.