ESP32 LED Blink Example
ESP32 DevKit V1 comes with on board red LED which is connected to GPIO2
Step 1: Connect Board to Laptop
Step 2: ESP32 LED Blink Example Code
Select boar ESP32 DEV Module from Tools >> Boards menu, then select appropriate com port. Upload this program to ESP32.
/*
* ESP32 LED Blink Example
* Board ESP23 DEVKIT V1
* ON Board LED GPIO 2
*/
#define LED 2
void setup() {
// Set pin mode
pinMode(LED,OUTPUT);
}
void loop() {
delay(500);
digitalWrite(LED,HIGH);
delay(500);
digitalWrite(LED,LOW);
}