ESP32 simulator project - Blinking LED project with 10 LEDs. LED chaser project is easy to build, fun to share!
Learn ESP32 programming faster. You can use Wokwi to build ESP32 projects online. it supports temperature sensors, humidity sensors, sensors, displays, LEDs and it works on all the platforms - Windows, macOS, ioS, Android and Linux.
Visit the Wokwi site and start building your projects right away.
Connection diagram for the LED chaser project
//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);
}
Simulation of ESP32 LED chaser project in action
ESP32 LED chaser simulation on Wokwi
The 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