Getting Started with ESP32 on Arduino IDE

Talha Khan
4 min readAug 12, 2022

--

Introduction

The ESP32 DEVKIT-V1 is a microcontroller board developed by Espressif Systems which is a Chinese origin company having offices in several countries. The Esp32 is in most part an upgrade of the ESP8266 development boards being developed by the same company.

One of the main features that makes the ESP32 stand out in the ESP32 vs ESP8266 debate is its in-built WIFI and Bluetooth capabilities, giving it applications in the field of IoT applications. Other specs of the board include a dual core 32 bit architecture, along with a 512 Kb RAM and a maximum clock speed of 240 MHz due to which it outruns the Arduino UNO and the STM32F103C8T6 BluePill board. And last but not the least, it boasts 30 GPIO pins with a I2C, PWM, ADC, DAC, SPI along with built-in HAL sensor and internal temperature sensor.

The ESP32 can be programmed using several ways like the micropython, Arduino IDE and the Espressif IDF etc. In this article, we will focus on programming the board using the Arduino IDE.

Getting Started

First off, make sure you have downloaded and installed the Arduino IDE from their website. Afterwards, start the Arduino IDE and go to the File→Preferences option and paste the following link in the additional boards URL section as shown

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

Further, go to the Tools→Board→Boards Manager as shown

And type esp32 in the search bar, wherein you will get an option of esp32 board by Espressif systems, install it.

Lastly, we will again go to the Tools→Board where we will see an ESP32 Arduino option. From there, select the DOIT ESP32 DEVKIT V1 among the options. Set the upload frequency to 115200 and once you plug in the ESP32 using a micro USB data cable, the Port option will also start to show where you will select the COM4 option.

NOTE: If you observe that the COM option does not appear even after plugging in the board, that means your device lacks certain drivers. To solve this issue, just do a google search for CP2102 drivers and install them to your device and then check again.

LED Blinking

Now in order to check whether our Arduino IDE programmes the ESP32, we will try out the classic LED blinking code.

Following is the code to upload

NOTE: Make sure that your Serial.begin rate and the Tools→Upload Speed are the same

void setup() {
Serial.begin(115200);
pinMode(LED_BUILTIN,OUTPUT);//To give the LED a default state
digitalWrite(LED_BUILTIN,LOW);
}void loop() {//To turn on LED
digitalWrite(LED_BUILTIN,HIGH);
delay(1000);
//To turn off LED
digitalWrite(LED_BUILTIN,LOW);
delay(1000);
}

The upload might take some time but once it is done, you will see the on-board LED of the ESP32 start blinking with an interval of 1 second.

Conclusion

This was just a check-up code to check whether our Arduino IDE has successfully been configured to program our board. We can use the same IDE along with any needed libraries to use the ESP32 for many fun projects as a hobbyist and a professional. Furthermore, the WIFI and Bluetooth capabilities give us a lot of freedom in indulging in the field of IoT without the use of any external modules.

P.S, for any paid content writing and/or article writing tasks, and for any free guidance about the ESP32 board, do reach out to me at khantalha7367@gmail.com

--

--

Talha Khan

An electrical engineering student and tech enthusiast working to spread ideas and innovation