Wokwi Simulator is a free, online, and easy-to-use tool to simulate the ESP32 projects. It also supports Arduino UNO, Arduino Mega, and other projects. Here are the quick links before we jump on to the step-by-step guide.
ESP32 Embedded Systems Simulator home page - https://wokwi.com
ESP32 simulator documentation - https://docs.wokwi.com/guides/esp32
Okay. Let us go through the step-by-step guide to simulate your next ESP32 project online! Let us get started.
Step 1:visit the Wokwi website - https://wokwi.com and click on new project >> Select ESP32 in the new project list option
The new ESP32 project template page will open. Let me take you through a few important parts of the Wokwi ESP32 simulator.
The window on the left side is the editor window. here is where you write the code, add the libraries, edit the connections, add more source files, and so on. What you see to the right is the simulator window. Here is where you add all the components, connect different elements together and see the simulation in action!
Step 3:The control buttons (HMI) are kept minimal and serve the purpose. The options are pragmatic. here we go. The small drop-down arrow (inverted rectangle) provide you with more options when you click on them
- Rename the files
- Add new files
- upload new files
- The Green button - Play the simulation/compile the code/run the project
- The Purple one - This button is to add elements such as LEDs, buttons, Switches, ICs, and more
- The grey button houses
more
options as you can see in the article below
The Wokwi ESP32 simulator supports both Arduino-style programming as well as MicroPython programming. in this article, I will use Arduino-style programming.
Let us first build the circuit. we will connect the LED so that we can blink it. A series resistor is necessary to limit the current through the LED. The image below shows you how I added an LED
Connect them now with the wires together 😀
The connection is now complete. We are connecting the LED to GPIO18
.
Here is the code to make LED blink on ESP32. You can directly copy and paste this code into the editor window.
#define LED 18
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(500);
digitalWrite(LED, LOW);
delay(500);
}
Step 6:This is it. Now you can click on the green circular button in the simulator window to get the simulation running!
I hope you too have enjoyed the process of simulating the ESP32 project online. Sharing your project is very easy. You can share your Wokwi Arduino or ESP32 simulator project easily with just one click
For any support, feel free to hop on to the Facebook group. Help is always a click away!
See you with another article on an embedded systems simulator project. until then 👋
Comments
Please log in or sign up to comment.