Embedded System Project : Blink the LED, ESP32 First Project

Galuh Dipa Bharata
3 min readJan 31, 2021

this is my first post for my embedded system courses and this is the first project for this 3rd semester.

So, the job is to make the built-in LED blink in certain times.

Actually to set up the ESP32 to your laptop/computer is not that complicated. What you need is -of course- ESP32 and Micro-USB cable.

ESP32
Micro USB cable

The IDE is from arduino, the Arduino IDE can be download it here https://www.arduino.cc/en/software/

The first look of the IDE will be like this.

Arduino IDE

Now what we should do is to set-up the environment. Go to File → Preferences. It should be like this.

Preferences from arduino IDE

Then copy this link https://dl.espressif.com/dl/package_esp32_index.json and paste it to “Additional Boards Manager URls”

Click OK. Now back to the main page, and go to Tools → Board → ESP32 Arduino, choose ESP32 Dev Module. What you should do now is to connect the ESP32 to your computer using Micro-USB. Then find the right port that your ESP32 connect with by searching “Device Manager” on your windows search bar.

Finding The Right Port

After you make sure the ports that ESP32 connected with, now set-up the ports in your Arduino IDE with the same information that you already have from device manager. Now, open File → Example → 01.Basics → Blink. Include the ESP32 library by going to Sketch → Include Library and choose ESP32 Library. Now lets play with the code. From the tutorial, the code is not stop right there, you should change it, well it just a minor change. Add int LED_BUILTIN = 2;

verified the code, then upload.

If you have some issue such like time error, try to push the boot button on your ESP32, push it when the IDE show ‘connect’.

Now the code, the first is the library for ESP32. Then int LED_BUILTIN = 2 is to select which LED we want to blink it.

For the void setup() till the end of the code is already there from the example. The pinMode is setting up the ESP32 to do something, obviously to blink the builtin LED. For the loop procedure, it will make the LED on and off for every second.

This is the video for my first project!

https://www.youtube.com/watch?v=EXcacT0BNw4

What i have learned in this first project is to set-up your work properly.

And its done. Thanks!

Galuh Dipa Bharata, 18219100

--

--