Introduction to the ESP32 

Lesson 8

Setup the ESP32 on the Arduino IDE (Windows)

In this lesson, you will learn how to setup your Arduino IDE so that you can use it to program your ESP32. This lesson contains instructions for Windows users. If you use a Mac, please look at Lesson 7.

You can watch the video, or, if you are the "reading" type, you can read the text below.

One of the really nice things about the ESP32 is that it works with the Arduino IDE.

Not only that, but because of the support that the manufacturer has implemented for the Arduino platform, we can use a lot of the existing Arduino libraries, infrastructure and hardware.

That means that we can reuse what we already know from our work with the Arduino. We can build on that and make use of all of the additional hardware capabilities that the ESP32 brings along.

To be able to use the Arduino IDE to program the ESP32, you will need to install the ESP32-Arduino Core software. I will show you how to do this now. 

I assume that the Arduino IDE is already installed on your PC. If it isn't, please install it now, and then continue (I'll wait here, it's ok 🙂 ).

Download ESP32-Arduino Core

With the Arduino IDE installed and operating on your computer, use your browser to download the ESP32 support software from Github.

You can download these files an manually copy them into the hardware folder of your Arduino IDE installation, but there is an easier and safer way. You should use the Arduino IDE Boards Manager. You can find instructions in Github (or just continue reading). 

The Boards Manager utility in the Arduino IDE makes installation easy and safe.

The IDE Boards Manager utility works across platforms. You can use this method on Mac, Windows, or Linux.

Copy this URL:

https://dl.espressif.com/dl/package_esp32_index.json

Open the Preferences window of the Arduino IDE, and paste the URL you just copied in the "Additional Board Manager URLs" field, as you can see in the figure below:

Copy the hardware definitions URL to the URLs field in the Preferences window.

Click Ok to dismiss the Preferences window.​

Next, open the Board Manager utility by clicking Tools, Board, Boards Manager in the IDE menu.

Bring up the Boards Manager utility.

Search for "ESP32" in the text box. A single result should appear.

Click on "Install" to do just that. In the Figure below, the ESP32 support is already installed in my Arduino IDE, so the "Install" button is inactive.

Search for the ESP32 module in the Boards Manager.

There's a few megabytes of file data to download and install, so be patient.

Test the ESP32 support

A while later, when the utility completes the download and installation of the software, confirm that the ESP32 support is there.

In the Arduino IDE menu, click on Tools, Board, and scroll down to see the new ESP32 section. There should be numerous boards there. The one we are interested mostly about, is the generic ESP32 Dev Module, like in the figure below. Click on "ESP32 Dev Module" to select it, and make it the active target in the IDE.

The ESP32 support software provides support for numerous ESP32 boards.

Now that you have selected the ESP32 Dev Module, confirm the selection in the IDE window. The status line should contain the text "EXP32 Dev Module", as well as its various parameters, like its frequency and flash memory size.

Yes, the ESP32 is the Arduino IDE programming target.

Let's do one last test. Load one of the example ESP32 sketches. In the IDE menu, select File, Examples, ESP32, AnalogOut, ledcWrite_RGB. This is actually one of the sketches we  discuss in the video lecture.

Load the ledcWrite_RGB example sketch.

This sketch demonstrates how to create PWM output, and uses functions that comes with the ESP32-Arduino Core, and are not available to the Arduino Uno. You can learn more about these and other hardware-specific functions in the video course.

An ESP32 example sketch.

This concludes the installation and verification of the Arduino IDE support for the ESP32 board. If you want to learn how to install the ESP32 support for the Mac, checkout lesson 7

If your ESP32 Dev Kit contains the CP21012 USB driver chip (most lower cost dev kits do), you will need to install the USB driver on your computer before you can upload your first sketch. You can learn how to do this in Lesson 9.

"Introduction to the ESP32" series

Ready for some serious learning?

Enrol to 

ESP32 for Busy People.

This is our comprehensive ESP32 course for Arduino Makers.


It's packed with high-quality video, mini-projects, and everything you need to learn Arduino from the ground up.


Just click on the big red button to learn more.

>