You can use the ESP32 simulator to learn ESP32 programming. You learn ESP32 programming faster. Since the ESP32 simulator by Wokwi is web-based, you can access the projects anywhere. Wokwi ESP32 simulator runs on all platforms Windows, Mac, IoS, Linux, Android, and more...
In this project, there are 10 LEDs connected, all to the ESP32 via a current limiting resistor. You can change the color of the LEDs and wires by editing the diagram.json file. The programming is very similar to how you program Arduino boards!
Wokwi is an online embedded systems simulator that supports ESP32, Cortex M0 based Raspberry Pi Pico board, and more
Things you need- ESP32 module
- 10 LEDs
- Connecting wires
- Embedded systems simulator (wokwi)
//initializing a variable for digital pin 2 to 13
int led1 = 15;
int led2 = 2;
int led3 = 4;
int led4 = 5;
int led5 = 18;
int led6 = 19;
int led7 = 21;
int led8 = 22;
int led9 = 23;
int led10 = 32;
int led11 = 33;
int led12 = 25;
void setup() {
// put your setup code here, to run once:
//initialize digital pin as output
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(led5, OUTPUT);
pinMode(led6, OUTPUT);
pinMode(led7, OUTPUT);
pinMode(led8, OUTPUT);
pinMode(led9, OUTPUT);
pinMode(led10, OUTPUT);
pinMode(led11, OUTPUT);
pinMode(led12, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(led1, HIGH);//it mean to give 5v(high) to pins.here ,the led will be on.
delay(30);//1000 = 1 second
digitalWrite(led2, HIGH);
delay(30);
digitalWrite(led3, HIGH);
delay(30);
digitalWrite(led4, HIGH);
delay(30);
digitalWrite(led5, HIGH);
delay(30);
digitalWrite(led6, HIGH);
delay(30);
digitalWrite(led7, HIGH);
delay(30);
digitalWrite(led8, HIGH);
delay(30);
digitalWrite(led9, HIGH);
delay(30);
digitalWrite(led10, HIGH);
delay(30);
digitalWrite(led11, HIGH);
delay(30);
digitalWrite(led12, HIGH);
delay(30);
digitalWrite(led1, LOW);//it mean to give 0v(low) to pin.here, led will be off
delay(30);
digitalWrite(led2, LOW);
delay(30);
digitalWrite(led3, LOW);
delay(30);
digitalWrite(led4, LOW);
delay(30);
digitalWrite(led5, LOW);
delay(30);
digitalWrite(led6, LOW);
delay(30);
digitalWrite(led7, LOW);
delay(30);
digitalWrite(led8, LOW);
delay(30);
digitalWrite(led9, LOW);
delay(30);
digitalWrite(led10, LOW);
delay(30);
digitalWrite(led11, LOW);
delay(30);
digitalWrite(led12, LOW);
delay(30);
}
Code link for the simulationhttps://wokwi.com/arduino/projects/313946183655490114
The ESP32 simulation in actionThe below article answers the following questions
- How to draw and connect using wires
- How to add a part in the Wokwi Simulator
- How to change wire colours
- How to delete a part on Wokwi
- How to move, rotate parts on the Wokwi Simulator and more
https://www.hackster.io/Hack-star-Arduino/how-to-use-wokwi-arduino-simulator-what-is-wokwi-304e6b
Support/feedback/suggestions?you have many ways to ask for help, suggest a feature or share your feedback
- Open an issue on GitHub
- Visit Facebook group
- Hop on to Discord Server!
- leave a comment here π
You can watch an example video on the ESP32 simulator by Wokwi
Comments