Wokwi Arduino Simulator: How to Add Parts, Move, Rotate, Add Wires, Change Colors and More

by sharepksn in Circuits > Arduino

25 Views, 0 Favorites, 0 Comments

Wokwi Arduino Simulator: How to Add Parts, Move, Rotate, Add Wires, Change Colors and More

2021-07-13_14h52_43.png

Introduction to Wokwi Arduino simulator

Wokwi Arduino simulator supports Arduino UNO, Mega, Nano and several other boards. It simulated various parts (Wokwi elements) such as LEDs, Shift registers, Buzzer, sensors (ultrasonic, temperature, humidity etc) SSD display, keypads and much more. You can learn Arduino programming wherever you are. No hardware is necessary. Besides all this, the Arduino simulator is completely free to use!

In this article, you will briefly learn about the "How-Tos" for the Wokwi Arduino Simulator. By the end of the article, you will have learnt a lot of features of the Wokwi Arduino simulator as well as a good 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!😀😀

Supplies

Arduino UNO, Arduino Mega, LEDs, Potentiometer, LCDs and more

How to Add a Part to the Wokwi Arduino Simulator?

Wokwi Arduino Simulator - how to add a new part.gif
Wokwi Arduino Simulator - how to add parts - advanced users.gif

To add the part, you just have to click on the purple "+" button. You will find the button at the top of the diagram editor.

Advanced users can add the element in the diagram.json file.

Refer to the homepage for additional useful information.

How to Move the Parts on the Wokwi Arduino Simulator?

Wokwi Arduino Simulator - how to move parts - advanced users.gif
Wokwi Arduino Simulator - how to move Arduino .gif

To move the parts around, simply click and drag the parts to the desired position. 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 useful information.

How to Rotate a Part on the Wokwi Arduino Simulator?

Wokwi Arduino Simulator - how to rotate parts - advanced .gif

To rotate the part, click on the part and then press 'R' on your keyboard. 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)

How to Delete the Part on the Wokwi Arduino Simulator?

Wokwi Arduino Simulator - how to delete parts.gif

You can delete the part by selecting it and then press the 'Delete' button on your keyboard. Deleting only works, when the simulator is not running

How to Add a Wire (connect Two Components) in the Wokwi Arduino Simulator?

Wokwi Arduino Simulator -connecting wires.gif

To create a wire between two parts, just 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 in the place where you want the wire to make a turn.

How to Change the Color of the Wire in the Wokwi Arduino Simulator?

Wokwi Arduino Simulator -changing the color of the wires.gif

Changing the colours of the wire is not possible in the simulator window. You can change the colour of the wire by editing the diagram.json file. Here is how it is done

How to Delete the Wires on the Wokwi Arduino Simulator?

Wokwi Arduino Simulator -deleting wires.gif

deleting the wires is super easy on Wokwi Arduino Simulator. you have to just hover over the wire. you will see the marching ant pattern on the wire that the wire changes to click on the wire. You can only do it when the simulation is not running.

a list of 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

How to Find More Info About Any Element in the Wokwi Arduino Simulator?

Wokwi Arduino Simulator -Getting help element.gif

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.

How to Change the Colour of the LED on the Wokwi Arduino Simulator?

Wokwi Arduino Simulator -changing LED color.gif

You can change the LED colour by editing the diagram.json file. here is one example.

How to Change the LCD Character Display Pins From the Full Version to the I2C Version on Wokwi Arduino Simulator?

Wokwi Arduino Simulator -LCD display pins update.gif

There are a lot of tricks to customise 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.

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 at all, 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.

How to Make Wires Invisible in the Wokwi Arduino Simulator?

Wokwi Arduino Simulator -Hiding the wires.gif

Sometimes, we need the wires but we don't want to show them in the

simulation window. either you might have routed them in a messy way or there are a lot of wires too. Here is a simple trick. Just make the wires colour attribute empty.