Installation of ESP32 and ESP8266 Boards in Arduino IDE:

Go Arduino IDE->File->Preferences.

1k-b7LGFfOJP7aCAeYNuv3QrmKuRtht5EP399JiY

                     

Enter the following links into the “Additional Board Manager URLs” field as shown in the figure below. Then, click the “OK” button:

ESP32: https://dl.espressif.com/dl/package_esp32_index.json

ESP8266:https://arduino.esp8266.com/stable/package_esp8266com_index.json

To use both ESP32 and ESP8266 boards at a time paste the below combined Json link :

https://dl.espressif.com/dl/package_esp32_index.json,https://arduino.esp8266.com/stable/package_esp8266com_index.json

After pasting the link in the Additional Board Manager URLs, press ok. 

qvyh0QqXyOROEMTpSXplGW0oNcCqE_5TNlyISwzm

                     

  • Now go to the Tools->Boards->Board Manager.

            gs2AQqsKjqZYkUMieFktGD98KAsJiPRBdilsyCh4     

In the board’s Manager search for ‘esp32’ and Click on install

5ZE7xMcHnYQhKqoSqHnUuJ4SZFP1LlfRqeNZe65D

                     

Note: It takes several minutes to install the esp32 Board depending on Internet Speed.

Testing the Installation

Plug the ESP32 board to your computer. With your Arduino IDE open, follow these steps:

  • After installation go to the Tools->Board->Esp32 Dev Module
 
 tCMvXEsAC92L9asRJzo-c4fZQGRLoZ8Ksnnv6OXm
  • Now go to Tools->Port ‘COM4’/Port ‘COM3’-Enter.

KSr7Gir0jgC_6d95RAvu1OyRg5baJbJTJoD881EM

                         

  • Open the following example under File > Examples > WiFi (ESP32) > WiFiScan-click ok.

-G19iLCM2AKj1vlfiZWLZzzxUEidy3uBc5DOff-c

                         

  • A new sketch opens in your Arduino IDE,

  • press the Upload button in the Arduino IDE. Wait a few seconds while the code compiles and uploads it to your board.

HgEQaz-6yzTM75Cmm29rA0yaQR7d_o-8UJDmPaQS

                         

If everything went as expected, you should see “Done uploading.” message.

Arduino IDE done uploading ESP32 WiFiScan sketch

                     

Open the Arduino IDE Serial Monitor at a baud rate of 115200:

Open Arduino IDE Serial Monitor at baud rate 115200

Press the ESP32 on-board Enable button and you should see the networks available near your ESP32:

ESP32 Testing Add-on installation in Windows PC, Max OS X, and Linux computer

                       

Common Error:

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 port selected, follow these steps:

  • Hold-down the “BOOT” button in your ESP32 board

Solved A fatal error occurred: Failed to connect to ESP32: Timed out… Connecting…

                

  • Press the “Upload” button in the Arduino IDE to upload your sketch:Arduino IDE uploading new sketch to ESP32

After you see the  “Connecting….” message in your Arduino IDE, release the finger from the “BOOT” button