4 ms·
Wasmino is an Arduino core fully compatible with the Arduino IDE. It allows you to compile your Arduino sketch to WebAssembly and run it in a browser, all using
by gyf304 6y ago
Wasmino is an Arduino core fully compatible with the Arduino IDE. It allows you to compile your Arduino sketch to WebAssembly and run it in a browser, all using the Arduino IDE.
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!
- elliottkember 6y agoGreat work! And fun timing - this similar project https://github.com/jandelgado/fastled-wasm https://github.com/jandelgado/fastled-wasm popped up on Reddit today. It simulates the FastLED library running on an arduino. There’s also some similar work here: https://github.com/wokwi/avr8js https://github.com/wokwi/avr8js although this does not use wasm, rather it emulates the AVR instructions from the built hex object.
- __init 6y agoWow, really great stuff! I wrote something similar for my high school a few years ago (back when I was less experienced with programming -- ack!). I used a library called JSCPP to interpret the C++ directly in the browser. 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 https://github.com/dpengineering/giffer-reborn And you can try it here: https://dpengineering.github.io/giffer-reborn/ https://dpengineering.github.io/giffer-reborn/
- gyf304 6y agoThat looks great!
- microtherion 6y agoThis is certainly a neat project, and an accomplishment in its own right. > 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…).
- gyf304 6y agoI completely agree with you that Arduino is incomplete with out the actual hardware. Especially given that Arduino and Arduino clones are incredibly cheap these days. This is more of a fun project which I hope would be useful in specific scenarios.
- obrajesse 6y agoThis is incredibly cool. One place I could see it being super useful is in making it easier to write regression tests for Arduino code. I'm one of the developers of https://github.com/keyboardio/Kaleidoscope https://github.com/keyboardio/Kaleidoscope - We've ended up putting together a 'virtual' Arduino core (https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio/tree/master/virtual/cores/arduino 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/testing https://github.com/keyboardio/Kaleidoscope/tree/master/testi... / https://github.com/keyboardio/Kaleidoscope/runs/1632368671?check_suite_focus=true https://github.com/keyboardio/Kaleidoscope/runs/1632368671?c... ) It's super-useful, but a browser-based sim might be even better for this.