Install ESP32 Board in Arduino IDE in less than 1 minute

The Arduino IDE has an add-on that enables you to program the ESP32 using the Arduino IDE and its programming language. In this article, we'll show you how to install the ESP32 board in the Arduino IDE in less than 1 minute, whether you're using Windows, Mac OS X, or Linux.

Prerequisites: Arduino IDE Installed

You need to have the Arduino IDE installed on your PC before starting this installation method. You may install two versions of the Arduino IDE: version 1 and version 2.

You can download and install Arduino IDE by clicking on the following link: arduino.cc/en/Main/Software

Which version of the Arduino IDE do we recommend? At present, several ESP32 plugins (such as the SPIFFS Filesystem Uploader Plugin) are not supported on Arduino 2. As a result, if you plan on using the SPIFFS plugin in the future, we recommend downloading the legacy version 1.8.X. You only need to scroll down the Arduino software page to find it.

If you want to use Arduino 2, you can do so by following this tutorial:

If you need to install the SPIFFS plugin later, you may do so by installing Arduino 1.8.X and having both versions installed on your PC.

Do you need an ESP32 board? You can buy it here.

Installing ESP32 Add-on in Arduino IDE

Follow these next steps to install the ESP32 board in your Arduino IDE:

1- In your Arduino IDE, go to FilePreferences.

Installing ESP32 Add-on in Arduino IDE Windows, Mac OS X, Linux open preferences

2- Enter the following into the “Additional Board Manager URLs” field:

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

Then, click the “OK” button:

Installing ESP32 Add-on in Arduino IDE Windows, Mac OS X, Linux enter URLs

Note: If you already know the ESP8266 board URL, you may use a comma to separate the URLs as follows:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json

3- Open the Boards Manager. Go to Tools > Board > Boards Manager…

Installing ESP32 Add-on in Arduino IDE Windows, Mac OS X, Linux open boards manager

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

ESP32 Add-on in Arduino IDE Windows, Mac OS X, Linux Installed

5- That’s it. It should be installed after a few seconds.

ESP32 Board add-on in Arduino IDE installed

Testing the Installation

Connect the ESP32 board to your PC. With your Arduino IDE open, do the following steps:

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

Arduino IDE select the ESP32 board in Tools menu

2. Select the Port (if you don’t see the COM Port in your Arduino IDE, you need to install the CP210x USB to UART Bridge VCP Drivers):

Arduino IDE select the ESP32 Port in Tools menu

3. Open the following example under File > Examples > WiFi (ESP32) > WiFiScan

Arduino IDE open WiFiScan example for ESP32

4. A new sketch opens in your Arduino IDE:

Arduino IDE uploading WiFiScan example to ESP32

5. In the Arduino IDE, press the “Upload” button. Wait for a few seconds while the code compiles and uploads to your board.

Arduino 2.0 Upload Button

6. If everything went well, you should see a “Done uploading” message.

Arduino IDE done uploading ESP32 WiFiScan sketch

7. Open the Arduino IDE Serial Monitor at 115200 baud rate:

Open Arduino IDE Serial Monitor at baud rate 115200

8. When you press the ESP32 on-board “Enable” button, you should see the following networks accessible near your ESP32:

ESP32 Testing Add-on installation in Windows PC, Max OS X, and Linux PC

Troubleshooting

When you try to upload a new sketch to your ESP32, you will see the following error message: “A fatal error occurred: Failed to connect to ESP32: Timed out… Connecting…”. It indicates that your ESP32 is not in the flashing or uploading phase.

After you've chosen the right board name and COM port, proceed as follows:

  • Hold down the “BOOT” button on your ESP32 board
Solved A fatal error occurred: Failed to connect to ESP32: Timed out… Connecting…
  • Press the “Upload” button in the Arduino IDE to upload your sketch:
Arduino 2.0 Upload Button
  • Release your finger from the “BOOT” button once you see the “Connecting…” message in your Arduino IDE:
Arduino IDE done uploading ESP32 WiFiScan sketch
  • You should then see the “Done uploading” message.

That's all. The new sketch should be running on your ESP32. To restart the ESP32 and run the newly uploaded sketch, press the “ENABLE” button.

You'll have to repeat that button sequence each time you wish to upload a new sketch. Follow the suggestions in the next step if you want to solve this problem once and for all without the need to press the “BOOT” button:

If you experience any problems or issues with your ESP32, take a look at our in-depth ESP32 Troubleshooting: A Complete Guide.

Conclusion

This is a quick guide that demonstrates how to Install ESP32 board in Arduino IDE in less than 1 minute on a Windows PC, Mac OS X, or Linux PC. Take a look at the ESP32 troubleshooting guide if you run into any problems during the installation process.

If you like ESP32, you may also like:

We hope you find this tutorial useful. Thanks for reading.

Oh hi there It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam! Read our privacy policy for more info.

Leave a Reply

Your email address will not be published. Required fields are marked *

Developing IoT Projects with ESP32

Automate your home or business with inexpensive Wi-Fi devices