Introduction
Arduino simulator is a tool where you can build Arduino projects by connecting an Arduino board and other things such as LEDs, buzzers or sensors in general. You can also run the Arduino sketch
online. It means you can write the code as well as make the connections and execute it online with the help of the Arduino simulator.
There are several Arduino simulators that are available for you. Out of several Arduino simulators, only a few are valid till today. Some are not updated, as result, they provide very fewer features and functionality. Others have a limited scope of sketches they will support and not all of them are free.
Wokwi Arduino simulator was introduced about two years ago merely a LED blinking code. Looking at how it has grown into a fully-fledged Arduino simulator in a short amount of time is outstanding.
In this article, You will see the key features and benefits of using the Wokwi Arduino Simulator. at the end of the article, I am sure you will find why the Wokwi Arduino simulator is a good alternative for the Tinkercad Arduino simulator.
Effective features of Wokwi Arduino Simulator- Load the HEX file and start executing your project!
You can effectively run existing Arduino sketches as well on the Wokwi Arduino simulator. To do this, you can go to the command palette (shortcut key F1
)
Here is the screenshot:
You can find the option in the drop-down menu. You can also notice a lot of other state of the art
options. This makes the Wokwi Arduino simulator, the one with a modern useful, and efficient Arduino editor among the available online Arduino simulators.
- You can also download the file for your reference on Wokwi Arduino Simulator
You can download the compiled hex file as well. The below screenshot has that option as the second element in the list.
- You can view the code in assembly language as well
Having a look at the assembly code as well is a dream come true for certain debug use cases. You can see where your code is getting stuck or losing the normal control flow.
For example, during debugging, one of the examples was always running the setup() function back to back. In real hardware, debugging this would be impossible. On the Wokwi Arduino simulator, it was very easy to find out what is happening and later fix the bug in the code. You can refer to the questions and the solution posted (using the Wokwi Arduino simulator).
- FastLED platform to unleash your creativity
You can use the Wokwi Arduino Simulator to engage with your creative skills. Here is one example of a FastLED matrix. This example simulates a working fighter software. Think about the efforts and time needed to set up the same with the real hardware, before you can start testing your code!!!
Amount of effort needed to create a matrix like this. In case you need to change the matrix size by 10 LEDs, the effort will be double the original. it will take more than a month to get one simple FastLED matrix to design, fabricate, assemble and test. It takes about 10 minutes to create a similar project on the Arduino simulator. You can focus on implementation and testing rather than rigging up and other logistics. The link to the below project is here.
It doesn't mean that you should never go to hardware. Arduino simulators help you to get your plan on paper. You can easily verify how it is going to look, test your code up to an extent and then confidently go ahead with the hardware implementation. Here is the article on the story of an idea getting its wings in the Arduino simulator, later, produced and it works instantly!
On the other hand, sharing projects were never simple. You are able to read about the fighter FastLED project or even the Splendida project because of the Arduino simulator. It is easy to share hardware among others but the simulation projects can be shared in just a click! Hence, You will always find the Wokwi Arduino simulator, a favorite tool for FastLED projects especially.
- Easy project sharing
Talking about the sharing feature of the projects, the Wokwi Arduino simulator has made it really easy. It is just a click, literally. Your friend can open the project, and just run it out of the box. Here is a snapshot from the Arduino simulator where you can simply click on the share button to copy the link. You can share the link which can be opened by anybody worldwide and start executing the project on the go.
I would like to give a link here where earlier features are compared here.
- You can easily add more libraries int your project on the Wokwi Arduino simulator
To include a library, go to the code editor and type #
on an empty line. You'll see a autocomplete dropdown with #include
suggestions for popular libraries.
By default, Wokwi compiles your code with the standard built-in Arduino libraries, such as Wire.h and SPI.h.
To add third-party libraries to your project, add a "libraries.txt" file to your project. List the libraries that you want to include, one library per line. Lines that start with "#" are comments.
For example, the following file will install the latest versions of Servo and FastLED, as well as version 2.3.0 of MySensors:
# Sample libraries.txt file:
Servo
FastLED
# Install a specific version of a library:
MySensors@2.3.0
You can find the library names in the Arduino Library Manager. Alternatively, you can find it inside the source code of the library. Look for the name
field of the library.properties
file.
At the moment, only libraries from the Arduino Library Manager are supported. If you need a library that is not available on the Arduino Library Manager, you can either copy the library source files to your project or submit it to the Arduino Library Manager.
Planned next action: additional features in version 2 soon!
Thank you for your time.
Share your interesting projects and browse through several curious projects from fellow developers and makers on Facebook Wokwi Group!
Stay Safe!
Never stop learning!
#wokwiMakes
Comments
Please log in or sign up to comment.