Installing the ESP32 board in Arduino IDE 2.0 (Windows, Mac OS X, Linux)

There is a new Arduino IDE – Arduino IDE 2.0 (beta). In this tutorial, you will learn how to install an ESP32 board in Arduino IDE 2.0 and upload code to the board. This tutorial is compatible with Windows, Mac OS X, and Linux operating systems.

Installation and Programming ESP32 Board in Arduino IDE 2.0 Windows Mac OS X Linux

According to the Arduino website: “Arduino IDE 2.0 is an evolution of the classic IDE with higher performance, an improved user interface, and many new features such as autocomplete, a built-in debugger, and sketch synchronization with the Arduino Cloud”.

Prerequisite: Arduino IDE 2.0 installed

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

Visit the Arduino website and download the appropriate version for your operating system.

  • Windows: Run the downloaded file and follow the instructions in the installation guide.
  • Mac OS X: Copy the downloaded file to your Applications folder.
  • Linux: Unzip the downloaded file, and then open the file where arduinoide will start the IDE.

Arduino IDE 2.0 installed successfully Windows Mac OS X Linux

If in doubt, you can check out the Arduino installation guide.

Install the ESP32 plug-in in Arduino IDE

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

1.In Arduino IDE 2.0, go to FilePreferences.

Arduino IDE 2.0 Open the preference menu to install the ESP32 board

2. Copy and paste the following lines into the Other Board Managers URL field.

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

Additional URL field ESP32 Arduino 2.0

Note: If you already have the ESP8266 development board URL, you can separate the URLs with commas like this:

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 Board Manager. You can go to Tools > Board > Board Manager… or just click on Board Manager icon.

Arduino IDE 2.0 Boards Manager Select Test

4. Search forESP32 and press theesp32Install button for Espressif Systems.

Install ESP32 board Arduino IDE 2.0

That’s it. It should be installed in a few seconds.

Test installation

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

Copy the following code to your Arduino IDE:

/********
  Rui Santos
  Complete project details at https://RandomNerdTutorials.com/vs-code-platformio-ide-esp32-esp8266-arduino/
*********/

#include <Arduino.h>

#define LED 2

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);
}

Upload sketch

In the top drop-down menu, select the “Unknown” board. A new window will open as shown below.

Arduino IDE 2.0 Select ESP32 board and COM port

You should select the ESP32 board model and COM port. In our example we use the DOIT ESP32 DEVKIT V1 board. ClickOK when finished.

Now all you have to do is click the Upload button.

Arduino 2.0 upload button

After a few seconds, the upload should complete.

Programming ESP32 Arduino IDE 2.0 uploaded successfully

Note: Some ESP32 boards will not automatically enter refresh/upload mode when uploading new code, and you will see many dots on the debug window followed by an error message. If this is the case, you will need to press the ESP32 BOOT button when you start seeing these dots on the debug window.

The ESP32 onboard LED should blink once per second.

ESP32 board built-in LED open HIGH Arduino IDE 2.0 demonstration

Serial Monitor

You can click the Serial Monitor icon to open the Serial Monitor tab.

Open Arduino IDE Serial Monitor Arduino IDE 2.0 ESP32

That’s it! You have successfully installed the ESP32 development board in Arduino IDE 2.0.

The knowledge points of the article match the official knowledge files, and you can further learn relevant knowledge. CS entry skill treeLinux introductionOnline installation software 38082 people are learning the system