ESP32 LED Blink Example

ESP32 is a new IoT device comes with Dual core CPU, WiFi, Bluetooth, In this tutorial we start with ESP32 Simple LED Blink Example. For software setup with arduino IDE read this.

ESP32 DevKit V1 comes with on board red LED which is connected to GPIO2 same as ESP8266 blink example.

Steps to Make LED Blink

Step 1: Connect Board to Laptop

ESP32 LED Blink Example

Step 2: ESP32 LED Blink Example Code

Upload this program to ESP32. Select boar ESP32 DEV Module from Tools >> Boards menu, then select appropriate com port. Upload the below program.

/*
 * https://circuits4you.com
 * 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);
}

Step 3: Testing

After uploading program you will find on board RED LED will start Blinking.

 

Leave a Reply