5.4.1 Project 1.1 LED Blink
1 Description

We’ve installed the driver of ESP32 PLUS development board.
In the first lesson, we will conduct an experiment to make LED blink.
Let’s connect GND and VCC to power. The LED will be on when signal end S is high level, on the contrary, LED will turn off when signal end S is low level.
In addition, the different blinking frequency can be presented by adjusting the delayed time.
2 Working Principle
LED is also the light-emitting diode, which can be made into an electronic module. It will shine if we control pins to output high level, otherwise it will be off.
3 Parameters
Working voltage |
DC 3~5V |
|---|---|
Working current |
<20mA |
Power |
0.1W |
4 Control Pin
Yellow LED |
12 |
|---|---|
\ |
5 Test Code
#define led_y 12 //Define the yellow led pin to 12
void setup() { //The code inside the setup function runs only once
pinMode(led_y, OUTPUT); //Set pin to output mode
}
void loop() { //The code inside the loop function will always run in a loop
digitalWrite(led_y, HIGH); //Light up the LED
delay(200); //Delay statement, in ms
digitalWrite(led_y, LOW); //Close the LED
delay(200);
}
6.Test Result
After uploading the code , you can see white and yellow LEDs flashing together.