There is a new Arduino IDE—Arduino IDE 2.0 (beta version). In this
tutorial, you’ll learn how to install the ESP32 boards in Arduino IDE
2.0 and upload code to the board. This tutorial is compatible with
Windows, Mac OS X, and Linux operating systems.
Arduino IDE 2.0 is an experimental software—it is still in beta
version. This means that you may find some bugs and some features may
not be fully developed.
If you want to install the ESP32 boards on the “classic” Arduino IDE, follow the next tutorial instead:
If you prefer programming the ESP32 using VS Code + PlatformIO, go to the following tutorial:
You migh also like reading the ESP8266 Guide: Installing ESP8266 NodeMCU Board in Arduino 2.0 (Windows, Mac OS X, Linux)
Prerequisites: Arduino IDE 2.0 Installed
Before proceeding make sure you have Arduino IDE 2.0 installed in 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.
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.0, go to File > Preferences.
2. Copy and paste the following line to the Additional Boards Manager URLs field.
https://dl.espressif.com/dl/package_esp32_index.json
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://dl.espressif.com/dl/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 at the left-side corner.
4. Search for ESP32 and press the install button for esp32 by Espressif Systems.
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:
#include <Arduino.h>
#define LED 2
void setup() {
Serial.begin(115200);
pinMode(LED, OUTPUT);
}
void loop() {
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
On the top drop-down menu, select the “unknown” board. A new window, as shown below, will open.
You should select your ESP32 board model and the COM port. In our example, we’re using the DOIT ESP32 DEVKIT V1 board. 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.
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.
Serial Monitor
You can click on the Serial Monitor icon to open the Serial Monitor tab.
That’s it! You’ve installed the ESP32 Boards successfully in Arduino IDE 2.0.
Wrapping Up
This is a quick guide that shows how to prepare Arduino IDE 2.0 for
the ESP32 Boards on a Windows PC, Mac OS X, or Linux computer.
Remember that Arduino IDE 2.0 is an experimental software, so it
might have some bugs, and some features might not be fully functional.
Next, you might want to read: Getting started with ESP32 or learn more about the ESP32 board with our resources:
Thank you for reading.
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 …
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
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 ?
Hello,
Is it worth migrating to this new version of IDE? How is it different from the one used so far?
Thanks.
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
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
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.
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.
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.
Hi Pete.
I’ve successfully uploaded code to that board before.
Maybe you have a faulty board??
We have this tutorial for that board: https://randomnerdtutorials.com/esp32-built-in-oled-ssd1306/
Regards,
Sara
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.
Hi again.
And does it work with Arduino IDE?
Regards,
Sara
Nope. Same problems.
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,
Hi.
Unfortunately, at the moment, we don’t have any tutorials about tensorflow.
Regards,
Sara
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,
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.
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?
Hi Roy.
I don’t think we’ll cover that subject in a near future.
Regards,
Sara
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.
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
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
I think holding the button depends on the hardware.
I don’t think it is related to the IDE.
Regards,
Sara
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.
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
I also updated the blog post with a note about the need to press the BOOT button.
Regards,
Sara
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.
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:xtensa-esp32-elf-gcc@1.22.0-97-gc752ad5-5.2.0
Failed to install platform: esp32:esp32.
Error: 13 INTERNAL: Cannot install tool esp32:xtensa-esp32-elf-gcc@1.22.0-97-gc752ad5-5.2.0: 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.
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