Setting Up The ESP32 Board — And Make It Blink.

Everything always has a beginning.

Carissa Aurelia
I learn ESP32 (and you should too).
4 min readJan 23, 2020

--

When I searched “microcontroller” on Unsplash, this was the third picture that came up in the result.

A table full of complicated circuit.
Photo by Clint Patterson on Unsplash

And uhh, nope. I think not.

We’re not going to do those complicated circuits in the pic (yet?). Because as a wise man once said:

Let’s start simple.

My dear lil’ ESP32 board. Source: private documentation

Recent circumstance allows me to procure an ESP32 development board with ease. The one I have (and the one I’ll use throughout this publication) is the ESP32 DEVKIT V1. Mine has 38 pins with the default pinout shown below:

The ESP32’s 38 pins default pinout. Source: http://www.andreadrian.de/ESP_Schachzwerg/

According to randomnerdtutorials.com, the ESP32 chip has dual core processors, with a built-in Wi-Fi and bluetooth (both legacy and Low-Energy). It runs 32 bit programs and has a 512 kB RAM. It also has wide variety of peripherals available: capacitive touch, ADCs, DACs, UART, SPI, I2C and much more. Cool, ‘right? And what makes it even cooler is that it comes with built-in hall effect sensor and built-in temperature sensor (so you don’t have to buy those add-ons in the future). All in all, in my personal opinion, the ESP32 board seems to be a robust kind of microcontroller compared to the Arduino products. It is also a lot cheaper than the (I’m sorry, ahem) pricey Arduino and currently has a lot of resources in the net from which I can learn (and you can too :D)

Without further ado, let’s jump right into the steps!

1. The ingredients

The secret ingredients of learning the ESP32 way. Source: private documentation

For setting up, I’m just gonna use my trusty laptop, an ESP32 board, and a MicroUSB to USB cable.

2. Installing the ESP32 Board on the Laptop

I’m going to use the Arduino IDE (sorry again, Arduino) to code the board. I don’t have any version of Arduino IDE installed on my PC, so I’m heading on to the Arduino’s website to install it. I’m installing the one for Windows.

The Arduino IDE download page. Source: private documentation

After opening the IDE, I’m going to download the ESP32 board add-on to the IDE so it can recognize the board. Going to File > Preferences will open a new window which looks like this:

The preference window. Source: private documentation

I paste this link https://dl.espressif.com/dl/package_esp32_index.json on the Additional Board Manager URLs and then click the “OK” button.

Next, heading to Tools > Boards > Board Manager… will open another new window on which I can install the ESP32 board add-on on the IDE. I just input “esp” on the search bar and then click the “Install” button. It takes a good internet connection (and a fast and stable one, preferably) and patience until I can get it installed properly. And this marks the last step of installing the ESP32 board.

FINALLY. Source: private documentation

3. Make it blink ;}

First, I connect my ESP32 board to my laptop using the MicroUSB to USB cable. The red indicator light will turn on when it is connected.

We’re getting close to it. Source: private documentation

I just want to see if the add-on is installed properly and the board is working fine. So I’m just gonna use the sample code to make the built-in LED blink. Accessing File > Examples > 01.Basics > Blink will open a new window with a simple blink program ready to be deployed.

PREPARE TO BE DEPLOYED!! Source: private documentation

All I have to do is click the arrow button on the top left of the screen to upload the code to the board. But first, make sure that the port is connected and the board is set to DOIT ESP32 DEVKIT V1 as follows:

Connected port. Source: private documentation
All set (or is all set?). Source: private documentation

Now here comes the tricky part. According to randomnerdtutorials.com, I have to hold the boot button before clicking the upload “arrow” button, then releasing it after the “Connecting…” message appears in the IDE. And I don’t know why we should do that, but it causes an error when I don’t do as the tutorial instructed so I’m just gonna do it anyway.

And after the message says “Leaving…”, all is set!

And there we have it (yaaay🎉🎉🎉). A blinking LED. Everything works fine. Pretty easy ‘right?

--

--