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.

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

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:

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.

Arduino IDE 2 Software Install Download
  • 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.
Arduino IDE 2.0 installation successful Windows Mac OS X Linux

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.

Arduino IDE 2 File, Preferences

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
Additional URLs Field ESP32 Arduino 2

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.

Arduino IDE 2 - Boards Manager

4. Search for ESP32 and press the install button for esp32 by Espressif Systems version 3.X.

Install ESP32 Arduino IDE 2 board add-on version 3

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

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.

Select ESP32 board Model Arduino IDE 2

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.

Arduino IDE 2 Upload Button

After a few seconds, the upload should be complete.

Arduino IDE 2 - upload code success ESP32

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.

ESP32 board Built in LED turned on HIGH Arduino IDE 2.0 demonstration

Serial Monitor

You can click on the Serial Monitor icon to open the Serial Monitor tab. Make sure you select the 115200 baud rate.

Open Arduino IDE Serial Monitor Arduino IDE 2.0 ESP32

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
  • 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:

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

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:

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:

Thank you for reading.



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 »
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 »

Enjoyed this project? Stay updated by subscribing our newsletter!

48 thoughts on “Installing ESP32 Board in Arduino IDE 2 (Windows, Mac OS X, Linux)”

  1. 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 only ask because my past experience of installing updates to the existing IDE has been less than happy. I have ended up having to reinstal libraries and boards as updating has always seemed to be a case of installing a new version over the top of an existing version, rather than just running an ‘invisible’ update file …

    Reply
    • Hi Geoff.
      I think you can have both Arduinos installed without conflicts. Just make sure you install the new Arduino 2.0 on a different location.
      Regards,
      Sara

      Reply
      • Thanks Sara. That makes sense. A little while ago, a colleague sent me this :

        which details another IDE for use with Arduino called Visual Micro. I’ve not tried it yet, just watched the video, but I have to say that it looks very good and does at least what the new beta Arduino IDE does, and maybe better yet. Might be worth you taking a look to see what you think ?

        Reply
    • Hi.
      At the moment, as the IDE is still in beta version, I prefer to use the “old” Arduino IDE or VS Code + PlatformIO at the moment.
      Andreas Spiess has done a great video explaining and comparing the differences.
      Regards,
      Sara

      Reply
  2. I loaded but could not locate the tools folder to put in the hooks for SPIFFS uploading to the Tools Tab. I had tool folders all over the place in an attempt to get it to appear.
    Have you guys installed that option?
    thanks.
    Dave

    Reply
  3. Hi Dave,
    I had that problem a while back and raised a query. Their reply is that the tools were probably implemented in Java whereas the Theia IDE framework Arduino IDE 2.x is based on supports VS Code extensions.
    The full reply is at
    https://forum.arduino.cc/t/tool-to-upload-data-to-spiffs-is-missing/699986
    I got around this by using OTA updates, as described by Sara and Rui at
    https://randomnerdtutorials.com/esp32-ota-over-the-air-arduino/
    Good luck, Martin
    P.S. Geoff, I have both versions of the IDE installed and running against the same sketch base.
    P.P.S Said, the major usage difference is that you can only have one sketch open at a time which makes copy/paste between sketches difficult.

    Reply
    • Hi Said,
      seems like the one sketch issue may be related to my Mac running Big Sur. Other OSes don’t have that problem.
      You can run both so give it a go.
      Regards, Martin.

      Reply
  4. Have they done anything to fix the Wemos-lolin32-oled board code uploading issues? I’ve spent hours on hours this week trying to get code loaded on this board without success using both Arduino IDE and VS code platformio on Win 10. Any combination of pressing/holding/releasing the EN and Boot buttons does not help.

    Reply
      • I started with that tutorial as soon as I had issues. No joy. What is odd is that every once and a while I can get the board to appear on the platformio device list under com12, but then it disappears again. I don’t find any pattern as to when it appears. The board otherwise functions fine with the code already running on it but I am trying to change that code. There is no EN pin on this board, like other ESP32 boards, to which to ad a capacitor. I cannot find a board schematic either or I would figure out another way to attach a capacitor from the EN pin to ground.

        Reply
  5. hi Rui.

    do you have tutorial about tensorflow lite run on ESP32?
    since I read from this https://www.tensorflow.org/lite/microcontrollers
    esp32 is one of the boards that supports tensorflow. i want to make something about ai on esp32. such as recognizing the sound to run or turn on something. but still don’t know where to start. hope you make a simple project using esp32 and tensorflow in the near future.

    best regards,

    Reply
      • hi.
        I hope you could make some tutorial about tensorflow in the near future, since AI especially deep learning become hot topic in the last few years. btw, I really enjoy all of your tutorials, easy to understand for beginner like me.

        regards,

        Reply
  6. Hello, the arduino ide2.0 does not recognize the esp32 wrover kit while the arduino ide 1.8.5 works with the wrover kit as an esp32 wrover module The wrover kit is simply and esp32 wrover module with ili9341 lcd ,sd card reader/writer, camera bus expansion ,as well as I/O headers and much more for an experimenter it is the ideal playgroundas it is ready out of the box to program /plug and play why this unit is being ignored or skipped over does not make sense,Why it does not work in arduino 2.0 I do not know???Please lets get it fixed.

    Reply
  7. Hi
    I see the arduino beta 2.11 works with my ESP32 🙂
    Do you know how or are you going to investigate using a JTAG debugger with the new arduino IDE?

    Reply
  8. Hello Sara,
    Im new to arduino and im trying to get a handle on how to use unix time on an Uno board.
    Is the information posted above valid for the Uno and Nano boards?
    And while I have your attention, is there a hidden ‘find’ function in the Arduino IDE to simply replacing text in the sketch.
    Now Im using MS Word.
    Is there such a function in Visual Micro?
    Im in the process of moving into Visual.

    Reply
    • Hi.
      To replace text in an Arduino sketch, you just need to press CTRL+F and a new window will open to find/replace text.
      Regards,
      Sara

      Reply
  9. Hello,
    I always have to hold the ESP32 “boot” button during upload of the sketch to my ESP32 DEV1 board, using Arduino 1.8.16. Its not mentioned in your tutorial.
    Is that boot holding still the case with Arduino v2?

    Thanks,
    Alan

    Reply
  10. My post that politely pointed out your omission of pressing the ESP32 boot button during sketch upload, was deleted by moderator it seems.
    No problem. My participation/signup to this site is now also being deleted.

    Reply
    • Hi.
      It was not deleted. You can see the comment above and you can also see that I answered your comment.
      We receive tons of comments every day on different blog posts.
      It is very difficult to keep up with all the comments.
      If a user never commented before, its comment will be subjected to moderation, which may take some time depending on the load of work we have.
      I never delete any comments.
      I’m sorry for the misunderstanding.
      Regards,
      Sara

      Reply
  11. I run an ESPduino32. But I have occasionally noticed choosing the board DOIT ESPduino32 results in compilation or upload errors. However choosing DOIT ESP32 DEVKIT V1 does not suffer from these issues. So you may want to choose DEVKIT for the ESPduino.

    Reply
  12. I am getting an installation error on attempting to install “esp32 by Espressif Systems” (step 4 above).

    Arduino IDE is 2.0.1. esp32 version is 1.0.6. Computer O/S is Windows 10 Home version 21H2 (build 19044.2075). Problem occurred on two different computers.

    Error is:
    Installing esp32:[email protected]
    Failed to install platform: esp32:esp32.
    Error: 13 INTERNAL: Cannot install tool esp32:[email protected]: moving extracted archive to destination dir: rename C:\Users\pjfit\AppData\Local\Arduino15\tmp\package-2000256404\xtensa-esp32-elf C:\Users\pjfit\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0: Access is denied.

    At this point (after the error) C:\Users\pjfit\AppData\Local\Arduino15\tmp is empty (which seems reasonable), but the C:\Users\pjfit\AppData\Local\Arduino15\packages\esp32\tools directory is empty too (which doesn’t seem reasonable).

    I did try running the Arduino IDE as admninistrator, but got the same error.

    Any hints? Thanks.

    Reply
  13. New to this…
    Arduino IDE 2.0.3
    Espressif esp32-wroom-32d dev board w/their board package powered by USB
    Selected ESP32 Dev Module on com5 (get board info reports same)
    Added 10mf capacitor to pins 2(en) and 14(gnd) per your tutorial (works great)
    Loaded Rui Santos “blink_led” code into new sketch
    Compiled/uploaded without error ending on “Hard resetting via RTS pin…” and spinning icon in bottom status bar “Building sketch”.
    Parsing back through compile msgs – “Chip is ESP32-D0WD-V3 (revision 3)”
    No blinking LED (just the solid red LED), no serial monitor output. Pressing either of the onboard buttons (en and boot, I believe) changes nothing.
    Advice, please…Tom

    Reply
    • No funcionará nunca con esa placa.

      El led incorporado es solo para ver que tiene alimentación (5V), nada más.

      Tengo la placa V.4 y le pasa exactamente igual.

      Esto ocurre con algunos modelos de placa ESP32. No es que la placa funcione mal. Es que el led integrado no se puede usar para proyectos.

      Reply
  14. I keep getting an error Error loading Python DLL:

    C:\Users\Jeremy\AppData\Local\Temp_MEI155442\python27.dll (error code 5)

    exit status 0xffffffff

    Compilation error: exit status 0xffffffffin the serial monitor that

    Reply
  15. Hi Sara,
    I just bought from two different sellers two ESP32s “mini” that seem to have the same processor (ESP32-WROOM-32 is written on one and ESP-WROOM-32 on the other) even if one of the boards when connected has both the blue and the red led on while the other has just the blue led on. Both of them have the pins arranged in two rows from each side of the board instead of a single row so the board is almost square and not so elongated as the “normal” ESP32 and is smaller. The problem is that I was not able to upload any program on these boards.
    I tried with the usual “blink” example but I always get the same error message
    A fatal error occurred: Failed to connect to ESP32: No serial data received.
    For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
    Failed uploading: uploading error: exit status 2
    The boards have only a reset button but no EN and/or BOOT button.
    I’ve tried in Arduino IDE several options by choosing many different types of ESP32 without success.
    With the same cable and the same USB port the “normal” ESP32 works perfect.
    I would be very grateful if you could help me.
    Thanks in advance
    Bruno

    Reply
    • Hi.
      You may need to hold down the BOOT button at the same time you press the upload button, have you tried that?
      Regards,
      Sara

      Reply
      • Hi Sara,
        This board has no BOOT or EN button but only a RESET Button.
        However after many more trials on different option I found that
        this board works as WEMOS LOLIN 32. So one of the board is now working while the other one has a big problem since when connected to USB there is the message “NO PORTS DISCOVERED” even if the drivers for the Sil2102 are properly installed (these two board have the same chip SIL2104). If I connect the faulty ESP32 with my PC through a FT232RL USB to serial UART interface the COM porta appears but when trying to upload there is a error message Fatal error unable to connect to ESP32. No serial data received.
        Do you have other suggestions or is this board faulty?
        Thanks for your help

        Reply
  16. Good night. First of all thank you for these complete tutorials, thanks to them I can solve my doubts and learn more about this beautiful world. Also excuse my bad English. I need your advice and experience.
    I have had my ESP32 WROOM 32D board installed compiling and it worked without problems, but a moment ago and after opening the Arduino IDE 2.0 and installing various updates of libraries and boards, I have stopped being able to compile, showing this error on the screen. I don’t know what to do to fix it anymore. Please, if you can help me I appreciate it. Greetings.

    Acceso denegado.

    exit status 1

    Compilation error: exit status 1

    Reply
      • Hi Sara;
        The Arduino IDE is working again, there has been a new board update today in the program and it may be that in the previous one there had been an error.
        Thank you very much for your interest and for your work and tutorials. Greetings.

        Reply
    • i was able to fix my issues with compiling by running the Arduino IDE as Administrator. i dont know if this would help your specific issue.. but i was getting errors related to compuling, and tried every suggestion that was made, and in the end, i ran the Arduino IDE as administrator, and it started compiling without errors.

      Reply
      • Thank you very much for your help Jeremy, today when starting the Arduino IDE there has been a new board update for ESP32 in the program and it has recompiled without problems. There has probably been a failure in the update. Greetings.

        Reply
  17. Hi Sara
    Just to inform you that I got a refund from Aliexpress because the ESP32 board was faulty
    Thanks for your help
    Bruno

    Reply
  18. I’m having a problem compiling sketches for ESP’s. I can compile for Arduino’s but not for ESPs. This is the error message I get.

    c:\users\myprofile\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\esp-2021r2-patch5-8.4.0\xtensa-esp32-elf\include\c++\8.4.0\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
    #include <bits/c++config.h>
    ^~~~~~~~~~~~~~~~~~
    compilation terminated.

    Any thoughts, comments or suggestions greatly appreciated.

    Reply
  19. hello i am having a problem in my esp32. in my serial monitor it just show different symbols what should i do with this problem.. thankyouu

    Reply

Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.