Wokwi Arduino simulator supports Arduino UNO, Mega, Nano, and several other boards. It simulated various parts (Wokwi elements) such as LEDs, Shift registers, Buzzers, sensors (ultrasonic, temperature, humidity, etc. ), SSD displays, and keypads. You can learn Arduino programming wherever you are. No hardware is necessary. Besides all this, the Arduino simulator is completely free to use!
Wokwi Arduino now supports ESP32 simulation on Micropython as well.
This article will briefly learn about the "How-Tos" for the Wokwi Arduino Simulator. By the end of the article, you will have known a lot of features of the Wokwi Arduino simulator and have excellent knowledge about the buttons and options present in the Wokwi Arduino simulator. You will be ready to take on your next Arduino Simulator project confidently. Let us get started!
1 How to add a part to the Wokwi Arduino Simulator?You must click the purple "+" button to add the part. You will find the button at the top of the diagram editor. Start typing in the search bar. Select the part from the results.
Advanced users can add the element in the diagram.json
file.
Refer to the homepage for additional helpful information.
2 How to move the parts on the Wokwi Arduino simulator?Click and drag the parts to the desired position to move the parts around. You can click and hold the part, move it to the desired location and release the mouse click.
You cannot move the parts when the simulation is running.
Advanced users can move the element in the diagram.json
file. Sometimes, when building complex projects, this will help a lot.
Refer to the homepage for additional helpful information.
3. How to rotate a part on the Wokwi Arduino simulator?Click on the part and press 'R'
on your keyboard to rotate the part. You cannot rotate the parts when the simulator is running.
You can also rotate the element in the diagram.json
file. This is also helpful when you want to set the angle of rotation to a certain angle other than (0, 90, 180, 270)
You can delete the part by selecting it and pressing the 'Delete'
key on your keyboard.
Note: Deleting only works when the simulator is not running.
Some parts can be deleted now using the pop-up menu. For example, I can delete an LED in the simulator window by clicking on the LED once and then clicking on the trash bin symbol.
5 How to add a Wire (connect two components) in the Wokwi Arduino simulator?To create a wire between two parts, point to the pin/pad where you want to start the connection from. Click on the destination pin/pad to complete the connection. Advanced users can also connect the two pins using wires by editing the 'diagram.json'
file. By default, the color of the wire is green. You will find ways to change the color in the below sections.
If you want the wire to go a specific way, you can click on the place where you want the wire to make a turn.
Changing the colors of the wire is not possible in the simulator window. You can change the color of the wire by editing the diagram.json
file. Here is how it is done
New way ππ½
Click on the wire. Select the wire. The options menu pops up. You can select the color of your choice. If you want to choose any other color, you can still follow the old method below.
Old way ππ½
Deleting the wires is super easy on Wokwi Arduino Simulator. You have to hover over the wire. You will see the marching ant pattern on the wire that the wire changes to click on the wire. Double-click on the wire to delete the wire.
You can also select the delete button in the pop-up menu, which you find when you click on the wire.
Here is a list of a few shortcuts for you in action:
"-"
Zoom out the simulator window
"+"
Zoom in into the simulator window
"R"
Rotate the selected part
"Delete"
Delete the selected part
"?"
Open documentation for the selected part
Click on the '?'
symbol, which appears on the top of the element when selected to go to the documentation page of that particular Wokwi Element. You can also hit "?" on the keyboard as a shortcut.
In the next sections, we will see some valuable tips about everything. Please leave a comment if you have any suggestions or questions!
9 How to change the color of the LED on the Wokwi Arduino simulator?You can change the LED color by editing the diagram.json
file. Here is one example.
There are a lot of tricks to customize what you want in the Wokwi Arduino simulator. To change the LCD type from I2C to the full version (8-bit data and control signals)
You have to edit the digram.json file, particularly the LCD element.
{
"type": "wokwi-lcd1602",
"id": "lcd",
"top": 64.8,
"left": -77.39,
"attrs": { "pins": "full" }
}
The attributes part ('attrs'
) can be used for a lot of things. To change the LCD to I2C type, change the parameter from 'full'
to 'i2c'
. If there are no parameters mentioned in the attributes, OR if there are no such attributes, you can add one. For more details, visit the docs page for the LCD. If you have doubts or need clarification, or have any suggestions, please leave a comment.
Sometimes, we need the wires, but we don't want to show them in the simulation window. Either you might have messily routed them, or there are a lot of wires too. Here is a simple trick. Just make the wire's colour attribute empty.
---------
12 How to rename the project in the Wokwi Arduino simulator?Sometimes, we need the rename the sketch file. It is very easy to rename the sketch. Click on the drop-down menu and select rename
.
To add the additional header files or source files to your next Arduino simulator project you can click on the button and select add file
option. The image makes it clear!
To download the Arduino project to your PC, click on the drop-down menu and select the Download Project ZIP
option.
If you have any questions or topics, feel free to comment. For quick help, hop on to Discord Server. Share your exciting projects and browse through several curious projects from fellow developers and makers on Facebook Wokwi Group!
15 How to flip the LED in the Wokwi Arduino simulator?To flip the LED, add an attribute by the name FLIP
and give a value to it. The image below from the Wokwi Arduino simulator window gives you an example!
To add the label or note to the LED, add an attribute by the name label and give a value to it. The image below from the Wokwi Arduino simulator diagram.json window gives you an example!
The end result will be this:
To add the label or note to the switch, add an attribute by the name label and give a value to it. It is very similar to how you put the labels on the switch. The below image grabbed from the Wokwi Arduino simulator (diagram.json) window gives you an example!
The result will be this:
It is effortless to share Wokwi Arduino projects. All you have to do is, hit the save button first to make sure you will save the latest changes. Later, click on the SHARE button (the pink one in the editor window). Below GIF image shows how to share the projects on the Wokwi Arduino Simulator.
Please support efforts by hitting the LIKE button π
19 How to change resistor value in the Wokwi Arduino simulator?To change the resistor value in the Wokwi Arduino simulator, Please follow the video instruction below! Head to diagram.json -> find the resistor -> and place the following text "value": "470"
in the attributes window! Voila!
Note: Wokwi only has a fundamental analog circuit simulation. You won't be able to use resistors together with analog components (e.g., potentiometer or NTC temperature sensor). You can still use the resistors as external pull-up/pull-down resistors.
Use the link below to access the projects. Click on the project options to find the shortcut to all the Wokwi-supported Arduino boards
https://wokwi.com/arduino/projects
Use the link to access the quick start guide. You can create customs chips on your own. You have a good collection of examples available in the above link.
You can create temperature and humidity sensors, VOC sensors, etc., efficiently. Custom chip creation is in the beta stage as of now. You can use the'#custom-chips'
channel on the Wokwi Discord group for help.
Once you have completed building and testing your project, it is a good idea to lock it. To lock your project, click on the drop-down menu, and click on the 'Lock Project' option.
Once you lock the project, you cannot make any changes. This helps you avoid accidental code changes that unintentionally affect your work.
It is easy to keep the wokwi project private. You can select the "Unlist" option from the options.
Yes. Wokwi supports three breadboards presently. The one below is the full size breadboard. Two other breadboard sizes are also available. The small sized one and the tiny one. You can select the bread board by specifiying the type in the diagram.json file
- wokwi-breadboard
- wokwi-breadboard-mini
- wokwi-breadboard-half
You have several options to reach out for help. The best way is Facebook, in my opinion.
Here are all the ways you can seek support:
- Wokwi Facebook User group - https://www.facebook.com/groups/wokwi/
- Facebook - https://www.facebook.com/wokwi
- Twitter - https://twitter.com/wokwimakes
- Discord - https://wokwi.com/discord
Comments