In this article, You will learn how to install ESP32 in Arduino IDE. It will be a step by step instructions on installing ESP32 in Arduino IDE. These instructions are based on windows but the process will remain same for other operating systems also. If you are not familiar with this development board , I recommend you to check these articles:
Note: To install, this development board in Arduino IDE, you should make sure, you have installed a lasted version of Arduino IDE. ESP32 has issues with the previous version of Arduino IDE. So I recommend you to delete the old version and install the latest version of Arduino IDE.
Install ESP32 Library in Arduino IDE
After installing the latest version of Arduino IDE, Click on the Arduino IDE icon and open it.
After that click and files and go to preferences.
Paste this link in Additional board manager URL https://dl.espressif.com/dl/package_esp32_index.json
If you already have other boards in this additional board manager URLs, you can separate them by commas and you can use as many boards you want.
This link is a board support package of development board.
After that click on Ok button.
Now you need to install library of ESP32 in Arduino IDE. To install library of ESP32 in Arduino IDE, go to tools>>boards and click on board manager as shown:
Now you will see a window of where you search for available boards.
In search window write ESP32 and you will find of option of ESP32 by Expressif Systems. Click on install button and install library of ESP32. It will take some time to download the library of ESP32.
After you have done with installation click on Close button.
Now you have successfully installed the library of ESP32 development in Arduino IDE.
How to verify if ESP32 installed successfully ?
Now you have installed ESP32 in your Arduino, if you want to know either you want install ESP32 in Arduino IDE correctly or not. You can verify it using a simple example already available in Arduino IDE for ESP32 development board for internet of things. When you install ESP32 library in Arduino IDE, these examples are also installed. So to verify if you have correctly installed ESP32 or not follow these steps.
First connect you board with computer through USB cable.
After connecting board with computer, you select the board, you are using. There are many types of ESP32 boards available in market. But we are using Dev kit in this tutorial. But you can use any board you want.
To select board , go to tools>>Boards and click on Dev module as shown in picture below.
Now you need to select the COM port to which your development board is connected.
To find it go to tools and click on port. Select a port to which board is connected.
Now we will upload a simple example to board and see it works or not.
If it works correctly, it means we have successfully installed this board in Arduino IDE.
We will use an example of wifi scan. What this example will be do? It will scan the available wifi networks available in my area and print those available networks on serial monitor.
To open an example click on file>>Examples and find the example of Wifi scan as shown in the figure below:
Now simply click on the Wifi scan example and open it. After that click on the upload button to upload this code to the board.
As soon as you press the upload button, first, it will compile code. After compiling code, it will start uploading code and you can find the message of uploading in Arduino IDE.
If you find difficulty in uploading code, you can hold the button of boot on esp32 and then click on upload button and once you find the message of uploading on Arduino IDE window release the button. Your issue will be resolved successfully and code will be uploaded without any issue.
After few seconds code will be uploaded successfully and you will see a message of done upload as shown below:
Now code has uploaded successfully. we need to check the output of code.
Click on tools and select a option of serial monitor.
After opening serial monitor select a baud rate of 115200.
After that you will see the message of Wifi scan on the serial monitor as shown in the figure below:
After it done with scanning of all available networks, it will display list of available networks as shown in picture below:
After some time it will again start scanning and display available wifi networks.
So this how easy it is to install the ESP32 development board in Arduino IDE. We have also verified the installation through an example. If you find any issue while installing and uploading code, let us know with your issues.