How to Make Blinking LED with ESP32 DEVKIT V1

Rahmat Al Fajri
4 min readFeb 6, 2022

Hello everyone! in this article i am going to show you how to blink a LED using ESP32 board. For those who do not know, ESP32 is a microcontroller that used as a development board for several purposes, like measuring air condition, display a text on LCD screen, and many more.

Now i am going to tell you how to blink built-in LED on ESP32 board and how to blink an external LED.

Required Hardware

  1. ESP32 DEVKIT V1 Board

2. Breadboard

3. Micro USB Cable

4. 1 pcs LED (any color)

5. 1 pcs 220 Ohm Resistor

6. 2 pcs Short Jumper Wire

Required Software

  1. Arduino IDE, you can get the app from this link https://www.arduino.cc/en/main/software.

After download, open the file and follow the instruction to install.

2. ESP32 Board Manager, open Arduino IDE and press Ctrl + , (comma) to open preferences, and copy this URL (https://dl.espressif.com/dl/package_esp32_index.json) then paste to Additionals Boards Manager URLs, then press OK.

After that go to Tools > Boards > Boards Manager

then search for ESP32, then click Install

After installing, go to Tools > Board > ESP32 Arduino, and select “DOIT ESP32 DEVKIT V1”

3. USB to UART Port Driver, you can get this from this site https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers, after download open the installer and follow the instructions to install.

How to Blink Built-In ESP32 LED

Step 1, attach ESP32 board into breadboard to secure the ESP32 legs from damage.

Step 2, connect your ESP32 board to the computer using micro USB cable, and then red LED on the ESP32 should turn on. Make sure your cable able to transfer data, not just providing power.

Step 3, open Arduino IDE and go to Tools > Port and select “COM3”

Step 4, go to File > Examples > 01.Basics and select Blink

Step 5, click Upload (the right-pointed arrow next to check button)

After the terminal says “Connecting..”, press the BOOT button on the ESP32 until the process continue on the terminal.

After the terminal looks like this you should have the blinking blue LED on the ESP32 board.

How to Blink an External LED with ESP32 Board

The steps are pretty similar to the previous one. Follow the first until fourth step from previous tutorial and follow these steps:

Step 5, choose an ESP32 pin to connect with a LED. In this case i am using D27 pin, and then make contant integer variable with value 27. In this case i am naming the variable “RED_LED”. After that, change “LED_BUILTIN” parameters to “RED_LED”.

Step 6, connect 220 ohm resistor from D27 pin to any free column on the breadboard, then connect the positive terminal of LED (longer leg) next to it (on the same column). After that connect the ground ESP32 pin to the negative terminal of LED with 2 jumper wires like the following picture.

Step 7, upload the code in the same way like fifth step from previous tutorial. And then you should have a blinking external LED.

That’s all for this tutorial. Thank you and have fun to try!

--

--