AVR8js – Open Source Arduino Simulator Based on JavaScript

AVR8js – Open Source Arduino Simulator Based on JavaScript

One of the things I love about JavaScritpt is the fact it keeps finding applications in different domains. One such use is in Arduino, with Espruino (open-source JavaScript interpreter for microcontrollers), and an interesting new one is the AVR8js. AVR8js is an open-source Arduino simulator based on JavaScript that can run in the cloud or virtually anywhere javascript runs.

Arduino has become a household name in the makers and hardware industry mostly thanks to it’s low-cost, easy to use the platform and the amazing community it has created over the years. Nevertheless, not everyone can always get access to an Arduino or a sensor, shield, or something to test run an idea, giving rise to the possibility of using simulators.

Arduino simulators haven’t necessarily been a household name, mostly becomes it is super easy to get an Arduino, one is probably lying next to you, and most simulators don’t work as expected as you wish. In the last 10 years, I think I have roughly tried 2 0r 3 simulators in the past: Proteus VSM and Autodesk TinkerCad. One thing familiar with most of those simulator platforms is that they are closed projects, and you are the mercy of the creators, which is something AVR8js is attempting to solve.

AVR8js is an AVR simulator that allows you to compile and run Arduino code directly in your browser!. AVR8js is open source in nature, and you clone the project and make modifications as you wish. Currently, there are examples of simulating multiple LEDs and even serial output.

Uri Shaked is the creator of AVR8js. He writes:

When I write about JavaScript or other Web-related topics, I often include code samples that you can run and interact with. This allows the readers to tinker with the code and experiment further, as well as test their understanding of the subject.

I wanted to bring the same experience to my Arduino and electronics blog post. That’s how AVR8js, an open-source AVR simulator that runs inside the browser, was born.

AVR8js Serial Output Demo
AVR8js Serial Output Demo

The code editor used for AVR8js is based on the modern Monaco Editor, the editor used with Visual Studio and provides support for syntax highlighting, automatic indentation, auto-complete, and many more. The AVR code is compiled to machine code using the Arduino CLI. More information about the AVR8js core is provided in the original post from Uri here.

Although AVR8js is still at its early stages, it has the potential of growing big mostly because of it’s open-source and the fact that it can run anywhere. More information about the project is available on the Github repo.

Please follow and like us:
Pin Share

Hi, I'm software, a hardware guy, and a technical writer. Have had a stint with the EdTech industries, but mostly interested in the space of deploying AI for edge computing. Otherwise, I am writing or coding about some technology pieces covering IoT, GPU computing, LoraWAN, PCB, Machine Learning, Precision Agriculture, Open Electronics, and related fields. Got a tip, freebies, launch, gig or leak? Contact me on Twitter, or via email: charlesayibiowuAThotmail.com. I don't bite.

view all posts by ayo
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
Get new posts by email:
Get new posts by email:

Join 97,426 other subscribers

Archives