0% found this document useful (0 votes)
7 views

esp32install

This document provides a tutorial on installing ESP32 boards in Arduino IDE 2 for Windows, Mac OS X, and Linux. It includes prerequisites, installation steps, testing the installation with a sample code, and troubleshooting tips for common issues. Additionally, it offers links to further resources and guides related to ESP32 programming.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

esp32install

This document provides a tutorial on installing ESP32 boards in Arduino IDE 2 for Windows, Mac OS X, and Linux. It includes prerequisites, installation steps, testing the installation with a sample code, and troubleshooting tips for common issues. Additionally, it offers links to further resources and guides related to ESP32 programming.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Installing ESP32 Board in Arduino IDE 2

(Windows, Mac OS X, Linux)

There is a new Arduino IDE—Arduino IDE 2. In this tutorial, you’ll learn how to
install the ESP32 boards in Arduino IDE 2 and upload code to the board. This
tutorial is compatible with Windows, Mac OS X, and Linux operating systems.

According to the Arduino website: “The Arduino IDE 2.0 is an improvement of


the classic IDE, with increased performance, improved user interface and many
new features, such as autocompletion, a built-in debugger and syncing sketches
with Arduino Cloud“.

If you want to install the ESP32 boards on the “classic” Arduino IDE, follow the
next tutorial instead: Installing the ESP32 Board in Arduino IDE (Windows, Mac
OS X, Linux)

If you prefer programming the ESP32 using VS Code + PlatformIO, go to the


following tutorial:

Getting Started with VS Code and PlatformIO IDE for ESP32 and
ESP8266 (Windows, Mac OS X, Linux Ubuntu)

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
You might also like reading the ESP8266 Guide: Installing ESP8266 NodeMCU
Board in Arduino 2 (Windows, Mac OS X, Linux)

Prerequisites: Arduino IDE 2 Installed


Before proceeding make sure you have Arduino IDE 2 installed on your
computer.

Go to the Arduino website and download the version for your operating system.

Windows: run the file downloaded and follow the instructions in the
installation guide.
Mac OS X: copy the downloaded file into your application folder.
Linux: extract the downloaded file, and open the arduino-ide file that
will launch the IDE.

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
If you have doubts, you can go to the Arduino Installation Guide.

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

Recommended reading: ESP32 Development Boards Review and


Comparison

Install ESP32 Add-on in Arduino IDE


To install the ESP32 board in your Arduino IDE, follow these next instructions:

1. In your Arduino IDE 2, go to File > Preferences.

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
2. Copy and paste the following line to the Additional Boards Manager URLs
field.

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

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Note: if you already have the ESP8266 boards URL, you can separate the
URLs with a comma, as follows:

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

3. Open the Boards Manager. You can go to Tools > Board > Boards
Manager… or you can simply click the Boards Manager icon in the left-side
corner.

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
4. Search for ESP32 and press the install button for esp32 by Espressif
Systems version 3.X.

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
That’s it. It should be installed after a few seconds.

Testing the Installation


To test the ESP32 add-on installation, we’ll upload a simple code that blinks the
on-board LED (GPIO 2).

Copy the following code to your Arduino IDE:

/*********
Rui Santos
Complete project details at https://RandomNerdTutorials.
*********/

#include <Arduino.h>

#define LED 2

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(LED, OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
digitalWrite(LED, HIGH);
Serial.println("LED is on");
delay(1000);
digitalWrite(LED, LOW);
Serial.println("LED is off");
delay(1000);
}

View raw code

Uploading the Sketch


Select your board before uploading the code. On the top drop-down menu, click
on “Select other board and port…“

A new window, as shown below, will open. Search for your ESP32 board model.

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Select the ESP32 board model you’re using, and the COM port. In our example,
we’re using the DOIT ESP32 DEVKIT V1. Click OK when you’re done.

Now, you just need to click on the Upload button.

After a few seconds, the upload should be complete.

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Note: some ESP32 development boards don’t go into flashing/uploading mode
automatically when uploading a new code and you’ll see a lot of dots on the
debugging window followed by an error message. If that’s the case, you need to
press the ESP32 BOOT button when you start seeing the dots on the debugging
window.

The ESP32 on-board LED should be blinking every second.

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Serial Monitor
You can click on the Serial Monitor icon to open the Serial Monitor tab. Make
sure you select the 115200 baud rate.

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
That’s it! You’ve installed the ESP32 Boards successfully in Arduino IDE 2.

Troubleshooting
1) If you try to upload a new sketch to your ESP32 and you get this error
message “A fatal error occurred: Failed to connect to ESP32: Timed out…
Connecting…“. It means that your ESP32 is not in flashing/uploading mode.

Having the right board name and COM por selected, follow these steps:

Hold-down the BOOT button in your ESP32 board

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Press the Upload button in the Arduino IDE to upload your sketch
After you see the “Connecting….” message in your Arduino IDE, release
the finger from the BOOT button
After that, you should see the “Done uploading” message

You’ll also have to repeat that button sequence every time you want to upload a
new sketch. But if you want to solve this issue once for all without the need to
press the BOOT button, follow the suggestions in the next guide:

[SOLVED] Failed to connect to ESP32: Timed out waiting for packet


header

2) If you get the error “COM Port not found/not available”, you might need to
install the CP210x Drivers:

Install USB Drivers – CP210x USB to UART Bridge (Windows PC)


Install USB Drivers – CP210x USB to UART Bridge (Mac OS X)

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

ESP32 Filesystem Uploader Plugin


After installing the ESP32 boards on the Arduino IDE 2, you may also want to
install the filesystem uploader plugin to easily upload files to the ESP32
filesystem (LittleFS)—check the following tutorial:

Arduino IDE 2: Install ESP32 LittleFS Uploader (Upload Files to the


Filesystem)

Wrapping Up
This is a quick guide that shows how to prepare Arduino IDE 2 for the ESP32
Boards on a Windows PC, Mac OS X, or Linux computer.

Next, you might want to read: Getting Started with ESP32 or learn more about
the ESP32 board with our resources:

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Build Web Servers with ESP32 and ESP8266 eBook
Learn ESP32 with Arduino IDE (eBook + video course)
More ESP32 tutorials and projects…

Thank you for reading.

SMART HOME with


Raspberry Pi, ESP32,
ESP8266 [eBook]

Learn how to build a home automation system and we’ll cover


the following main subjects: Node-RED, Node-RED
Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and
InfluxDB database DOWNLOAD »

Recommended Resources

Build a Home Automation System from Scratch » With Raspberry Pi,


ESP8266, Arduino, and Node-RED.

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Home Automation using ESP8266 eBook and video course » Build IoT
and home automation projects.

Arduino Step-by-Step Projects » Build 25 Arduino projects with our course,


even with no prior experience!

What to Read Next…

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
ESP32 Useful Wi-Fi Library Functions (Arduino IDE)

How to Set an ESP32 Access Point (AP) for Web Server

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
How to Make Two ESP8266 Talk

Enjoyed this project? Stay updated by subscribing our


newsletter!

Your Email Address

 SUBSCRIBE

50 thoughts on “Installing ESP32 Board in


Arduino IDE 2 (Windows, Mac OS X, Linux)”

Geoff Darby
May 19, 2021 at 6:32 pm

Hi

Can this be installed as an independent stand-alone entity, leaving the


existing IDE in place and still operational ? Will it pick up the existing
sketch folder and have access to all the libraries already installed ? I

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Custom dashboards, smartphone remote control, data sharing between boards.
Get them (for free) using your forum account!

Install esp32 from board manager


Development Tools IDE 2.x

russell_roberts 1 Jul 2022 post #1

I am using arduio ide. I am rtrying to install esp32 using bord manager


ESP 32 Version 1.08 installs but when I try to install any ESP32 version 2. the
download just hangs.

Would appreciate any help thanks

7.3k 3
views links

LarryD Jul 2022 post #2

Believe you need at least IDE 1.89

russell_roberts Jul 2022 post #3

Thank you for the input


I am actually on 2.0.0 rc 9

LarryD Jul 2022 post #4

Read thru this:

ptillisch Arduino Team Jul 2022 post #5

Hi @russell_roberts . Thanks for your report.

Please do this:

1. Select File > Preferences from the Arduino IDE menus.


2. Copy the contents of the "Additional Boards Manager URLs" field.
3. Paste the copied text in a reply here.
Skip to main content

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Please also tell me exactly which version of the ESP32 boards platform you are
trying to install (e.g., 2.0.4).

This information will allow me to investigate the problem.

russell_roberts Jul 2022 post #6

Thank you both larry and ptillisch

ptillisch
please find the requested info below

https://m5stack.oss-cn-
shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json 196
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-
pages/package_esp32_index.json 276

You it has now installed I just left it as it was and had my tea so over the past 30-40
minutes it has installed

I have 2.0.4 installed

Thank you.

I guess for me this issue is sort of resolved.


If you want ay logs just le me know

russell_roberts Jul 2022 post #7

This is Bizarre

I run this code some times it works some times it does not
ie sometimes it prints to serial sometimes not when I upload it

russell_roberts Jul 2022 post #8

Ok I think this relibality issue is me mis understanding the instructions written by I


guess a native chinese speaker.

Thank you
Skip to main content

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
ptillisch Arduino Team Jul 2022 post #9

I'm glad you were finally successful with the installation!

Support was added for three new microcontrollers to the ESP32 boards platform
since the 1.x version series:

ESP32-S2
ESP32-S3
ESP32-C3

Each of these have their own compiler toolchain, which must be installed in
addition to the "xtensa-esp32-elf-gcc" of the original ESP32 microcontroller. That
alone has added ~1.2 GB to the size of the installation. So you will find that the
installation time is increased significantly when compared to the 1.x versions.

6 months later

Closed on Jan 22, 2023


This topic was automatically closed 180 days after the last reply. New replies are
no longer allowed.

7.3k 3
views links

Reply

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Cloud PLC v2.0

DIRECTION TO INSTALL THE ESP32 BOARD ON


ARDUINO IDE

Installing the esp32 board in Arduino IDE

Before starting this installation method, make sure you have the latest version of the Arduino
IDE 2.2.1 installed in your computer.

If you don't, install it from https://www.arduino.cc/en/software , continue with this tutorial.

To install the ESP32 board in your Arduino IDE, follow these below instructions:

Step 1: In your Arduino IDE, go to File> Preferences

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


1
Cloud PLC v2.0

Step 2: Enter https://raw.githubusercontent.com/espressif/arduino-esp32/gh-


pages/package_esp32_index.json into the "Additional Board Manager URLs" field as shown
in the figure below. Then, click the "OK" button:

Step 3: open the board manager. Go to tools > Board > Board Manager. Search for ESP32
and press and install button for the esp32 by expressif System.
ESP32 will be installed after a few seconds.

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


2
Cloud PLC v2.0

TESTING THE INSTALLATION

Step 1: Plug the cloud PLC module in your computer. With your Arduino IDE open, follow
these steps:’

Step 2: Select your Board in Tools > Board menu (it's the ESP32 Dev Module)

Select the Port (if you don't see the COM Port in your Arduino IDE, you need to install
the FTDI Drivers: https://ftdichip.com/drivers/d2xx-drivers/ For Installation Guide, CLICK
HERE

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


3
Cloud PLC v2.0

Step 3: click the following example under the FILE > Example > WiFi (ESP 32) > WiFi
Scan.

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


4
Cloud PLC v2.0

Step 4: A new sketch opens in your Arduino IDE:


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

If everything is went as expected, then you should see a “Done Uploading” message.
Step 6: Open the Arduino IDE Serial Monitor at a baud rate of 115200.
Step 7: Press the ESP 32 on-board Reset button and you should see the networks available
near your ESP 32

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


5
Cloud PLC v2.0

Output on the serial Monitor

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


6
Cloud PLC v2.0

LIBRARY INSTALLATION

Step 1: To install the new library into the Arduino IDE. Go to Sketch > include Library >
Manage Libraries. And, also you can find libraries available in right side control panel.

Step 2: Then the Library Manager will open and you will find a list of libraries that are
already installed or ready for installation. In this example we will install the RTC library (i.e,
rtclib).Enter the library name to find it, click on it, then select the version of the library you
want to install. Sometimes only one version of the library is available. Then click on install.

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


7
Cloud PLC v2.0

Step 3: Wait for the IDE to install the new library. Downloading may take time depending on
your connection speed. Once it has finished, an Installed tag should appear next to the RTC
library. Then click on close.

Another method for adding and importing a zip. Library


Step 1: Go to Google, Search for (ie, rtc.lib). the website will be shown on the screen, you
want to install, click on download Zip.

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


8
Cloud PLC v2.0

Step 2: Go to Sketch > Include Library > add .ZIP Library.

Step 3: after that click on Add.ZIP library, then it will be goes to file manager, you can go and
select and open your library, the library installation had successfully installed.

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


9
Cloud PLC v2.0

Connect Cloud PLC device into your computer using USB cable. Ensure that the device is
powered on.
Now you’re ready to begin your work.

NOTE: Switch off the supply voltage of this product as well as of attached
devices before connecting or disconnecting them.
Always use insulated tools while working.
Do not touch any components of the board in open hand during
power ON

www.rdltech.in RDL TECHNOLOGIES PVT.LTD


10

You might also like