How to Setup an Esp-32 in the Arduino IDE

Got youself a new ESP-32 development board and wondering how you talk to it? The good news is that someone has done a lot of the hard work required to set up ESP-32 support in the Arduino IDE. The first thing we need to do is add the board manager files so that settings and boards relating to ESP-32 show up in the Arduino IDE. Go to File -> Preferences then enter  https://dl.espressif.com/dl/package_esp32_index.json into the “Additional Board Manager URLs” field:

Adding ESP-32 additional boards manager to Arduino IDE
Adding ESP-32 additional boards manager to Arduino IDE

Note: if you already have the ESP8266 boards URL, you can separate the URLs with a comma in the above.

Open boards manager. Go to Tools > Board > Boards Manager…

Search for ESP32 and press install button for the “ESP32 by Espressif Systems“ and hit install:

Installing ESP-32 Board In The Boards Manager
Installing ESP-32 Board In The Boards Manager

Select your Board in Tools > Board menu (in my case it’s the DOIT ESP32 DEVKIT V1)

Plug in the ESP-32 with USB cable to your computer.

Select the Port (if you don’t see the COM Port in your Arduino IDE) (tools->port).

Open the following example under File > Examples > WiFi (ESP32) > WiFi Scan

Testing Your ESP-32 By Opening the WIFI Scan Example Project
Testing Your ESP-32 By Opening the WIFI Scan Example Project

Press the Upload button in the Arduino IDE. Wait a few seconds while the code compiles and uploads to your board. When it says connecting…… press the boot button on the board and release.  If that didn’t work hold the boot button before you press upload and release when it says connecting. I’ve even had some dev boards that need the enable button pressed instead, doing one of these will work, you just have to find which one.

ESP-32 In The IDE Waiting For Boot Button Press
ESP-32 In The IDE Waiting For Boot Button Press

If everything went as expected, you should see a “Done uploading.” message.

ESP-32 Done Uploading In The Arduino IDE
ESP-32 Done Uploading In The Arduino IDE

Finally just open the Arduino IDE Serial Monitor at a baud rate of 115200 and hey presto you should see it scaning for WIFI networks. You may need to press enable/reset button first:

Testing The ESP-32 Using WIFI Scan On The Serial Monitor
Testing The ESP-32 Using WIFI Scan On The Serial Monitor

Leave a Reply

Your email address will not be published.