The ESP32 development board has some common problems, specially when you are trying to upload new sketches or install the ESP32 add-on on the Arduino IDE (version 1.8.5). This project is to describe common issues with the ESP32 programmed with Arduino IDE and shows how to fix them. If you will use other version of Arduino IDE it can cause other unexpected problems and errors.
1. How to install the ESP32 add-on for the Arduino IDE?
There’s an add-on for the Arduino IDE that allows you to program the ESP32 using the Arduino IDE and its programming language. Follow one of the next projects links to prepare your Arduino IDE to work with the ESP32 on your operating system - Windows (using GIT GUI) or Windows (directly on Arduino IDE) or Mac and Linux.
2. Why I cannot see the ESP32 boards in the Arduino IDE Tools menu (Windows operating system)?
After running get.exe file, do restart of the Arduino IDE and you will see the ESP32 boards available.
If at this moment you still can’t find your ESP32 board in the list, we highly recommend to repeat the installation process from the begining: Remove the entire folder /espressif/esp32 and install the Arduino IDE version 1.8.5 from the begining. Then, repeat the process to ensure that you are installing the boards in the right installation location/path and that Git GUI is downloading the files to the right location.
3. If I get an error - "Failed to connect to ESP32: Timed out" what to do?
Press the EN button to restart the ESP32 and run the new uploaded sketch.
You need to repeat this process every time you want to upload a new sketch.
4. If I get an error - "C:\\Users\\ User\\Documents \\Arduino\\ hardware\\ espressif\\ esp32/tools /xtensa-esp32-elf /bin/ xtensa-esp32- elf-g++”: file does not exist" - what to do?
If Arduino IDE fails to compile a new sketch to your ESP32 board after the ESP32 add-on installation, we recommend to re-run the get.exe file. Follow all the steps described above in issue 2. Sometimes you can have multiple Arduino IDE versions installed (portable and local installations) on Windows operating system. Make sure that you are running the Arduino IDE program where you have installed the ESP32 add-on.
If you have your ESP32 board pluged in to your PC but you can’t find the ESP32 port available in your Arduino IDE (it has a grey color) it can be one of these problems : 1. USB drivers missing or 2. USB cable is not the data cable - it's for charging only.
If you don’t see your ESP’s COM port available, this often means you don’t have the USB drivers installed. Take a closer look at the chip next to the voltage regulator on board and check its name. For example we have The ESP32 DEVKIT V1 DOIT board - it uses the CP2102 chip. Go to Google.com and search for your particular chip to find the drivers and install them in your operating system.
You can download CP2102 drivers from the Silicon Labs website. Install drivers and restart the Arduino IDE. You will see the COM port in the Tools menu when you run Arduino IDE again.
If you have the drivers installed, but you can’t see your device, double-check that you’re using a USB data cable. Some USB cables are often used for charging only. If you use a proper USB cable it will solve your problem.
If the ESP32 is only showing the weird text or gibberish messages in your Arduino IDE Serial Monitor make sure that you have the proper COM port selected and set correct baud rate. We are normally using 115200 or 9600 baud rate in our projects.
If you still cannot get the ESP32 add-on working with the Arduino IDE we recommend to try programming your ESP32 board with Atom text editor and PlatformIO IDE.
Probably your Arduino IDE is compiling the WiFi library for the Arduino board (instead of using the ESP32 WiFi library). If you don’t use WiFi shield you need to remove the WiFi folder from your Arduino IDE program directory (move it to your desktop, for example): C:\Program Files (x86)\Arduino\libraries\WiFi. Restart your Arduino IDE and try to compile the code again.