Random Nerd Tutorials
Shares

Installing the ESP32 Board in Arduino IDE (Windows instructions)

Shares

The ESP32 is currently being integrated with the Arduino IDE like it was done for the ESP8266. There’s an add-on for the Arduino IDE that allows you to program the ESP32 using the Arduino IDE and its programming language. In this tutorial we’ll show you how to install the ESP32 board in the Arduino IDE for Windows. If you’re using Mac Os or Linux follow these instructions instead. 

You may like: ESP32 vs ESP8266 – Pros and Cons

If you like the ESP32, enroll in our brand new course: Learn ESP32 with Arduino IDE.

Finding Your Arduino IDE Location

To find your Arduino IDE location (installation path), open your Arduino IDE and go to File Preferences:

Copy the location in the “Sketchbook location” field:

In my case, it’s the following:

C:\Users\ruisantos\Documents\Arduino

Edit the “Sketchbook location” with forward slashes, so it looks as follows:

C:/Users/ruisantos/Documents/Arduino

That’s the Arduino_IDE_Folder_Path. Save it, because you’ll need it in just a moment.

After that, close the Arduino IDE.

Installing Git

Having the latest Arduino IDE software installer version on your PC (not portable) from arduino.cc/en/Main/Software. Follow these next instructions:

1) Download and install Git and Git GUI from git-scm.com

2) Search for Git GUI, right-click the icon and select “Run as administrator“:

3) Select the Clone Existing Repository option:

4) Then, follow these instructions to enter the Source Location and Target Directory:

  • Source Location: https://github.com/espressif/arduino-esp32.git
  • Type the Target Directory manually: Arduino_IDE_Folder_Path/hardware/espressif/esp32

In my case, it looks like this:

C:/Users/ruisantos/Documents/Arduino/hardware/espressif/esp32

IMPORTANT: do not create the espressif/esp32 folders, because they will be created automatically.

5) Press the “Clone” button

6) Wait a few seconds while the repository is being cloned:

7) Open the folder: Arduino_IDE_Folder_Path/hardware/espressif/esp32/tools

8) Right-click the “get.exe” file and “Run as administrator“:

Wait for it to download and prepare all the files:

9) Re-open the Arduino IDE software

Testing the Installation

Plug the ESP32 board to your computer. Then, follow these steps:

1) Open the Arduino IDE

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

 

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

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

5) A new sketch opens:

6) Press the Upload button in the Arduino IDE. Wait a few seconds while the code compiles and uploads to your board.

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

8) Open the Arduino IDE Serial Monitor at a baud rate of 115200:

9) Press the ESP32 on-board Enable button and you should see the networks available near your ESP32:

How to Update Your ESP32 Arduino IDE Add-on

1) Open Git GUI and you should see the repository under Open Recent Repository. Click that link ~/Documents/Arduino/hardware/espressif/esp32:

2) Open the menu Remote Fetch from > origin:

3) Wait for git to pull any changes and close Git GUI

4) Open the folder: Arduino_IDE_Folder_Path/hardware/espressif/esp32/tools

5) Run the “get.exe” file:

Wait for it to download and prepare all the files:

6) Re-open the Arduino IDE software

Wrapping Up

This is a very basic tutorial that illustrates how to prepare your Arduino IDE for the ESP32 on a Windows PC. To install the Arduino IDE on Mac OS or Linux, follow these instructions instead.

You might also like reading:

Thanks for reading.


20 Easy Raspberry Pi Projects

Our new book is a beginner-friendly collection of electronics projects, perfectly suited for hobbyists, parents, kids, parents, and educators looking to level up their hardware skills - GET THE BOOK »

Recommended Resources

Home Automation using ESP8266 »
Build IoT projects and home automation gadgets with the ESP8266 Wi-Fi module.

Build a Home Automation System »
Learn how to build a automation system using open-source hardware and software from scratch.

Arduino Step-by-Step Projects »
Build 25 cool Arduino projects with our couse even with no prior experience!

Leave a Comment:

Add Your Reply