We will learn how to install the ESP32 board in Arduino IDE whether you’re using Windows, Mac OS X or Linux. More ESP32 projects you can find here.
Tag: Project 137 Installing the ESP32 Board in Arduino IDE (Windows, Mac OS X, Linux). Acoptex.lt
- Libraries: None;
- Sketch: None.
In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):
1. ESP32 development board with WiFi and Bluetooth and USB A / micro USB B cable 1 pc
2.Arduino IDE ( you can download it from here )
Understanding the ESP32 Development board with WiFi and Bluetooth
You can read more about it here.
Signals and connections of the ESP32 Development board with WiFi and Bluetooth
You can find more information (datasheets, schematics, pins descriptions, functional desgn descriptions) about each board (made by Espresiff Systems) by pressing Getting started link close to each board here.
Let’s check our development board – ESP32 DEVKITV1 with ESP-WROOM-32 module from Espressif Systems:
Pinout diagram for the ESP Wroom 32 breakout:
- ESP32-WROOM-32 – ESP32-WROOM-32 module soldered to the development board. Optionally ESP32-WROOM-32D, ESP32-WROOM-32U or ESP32-SOLO-1 module may be soldered instead of the ESP32-WROOM-32.
- USB-UART Bridge – A single chip USB-UART bridge provides up to 3 Mbps transfers rates.
- BOOT button – Download button: holding down the Boot button and pressing the EN button initiates the firmware download mode. Then user can download firmware through the serial port.
- EN button – Reset button: pressing this button resets the system.
- Micro USB Port – USB interface. It functions as the power supply for the board and the communication interface between PC and the ESP module.
- TX0, TX2 – transmit pin. GPIO pin
- RX0, RX2 – receive pin. GPIO pin
- 3V3 (or 3V or 3.3V)- power supply pin (3-3.6V).
- GND – ground pin.
- EN – Chip enable. Keep it on high (3.3V) for normal operation.
- Vin – External power supply 5VDC.
Step by Step instruction
The ESP32 is currently being integrated with the Arduino IDE like it was done for the ESP8266. There’s an add-on for the Arduino IDE that allows you to program the ESP32 using the Arduino IDE and its programming language. Before starting this installation procedure, make sure you have the latest version of the Arduino IDE installed in your computer. We use Arduino IDE version 1.8.13 and Windows 7 64 bit OS.
If this is your first time installing the ESP32 add-on on Arduino IDE you can ignore this part. If you have already installed the ESP32 add-on using the old method, you should remove the espressif folder first. If you’ve followed the older installation procedure and you’ve manually installed the ESP32 add-on with Git GUI, you need to remove the espressif folder from your Arduino IDE. To find your espressif folder and Arduino IDE location (installation path), open your Arduino IDE and go to File -> Preferences. Copy the location from the Sketchbook location field. Go to your Arduino IDE location directory: C:\Users\User_name\Documents\Arduino and open the hardware folder.
Then right click on the espressif folder and delete it.
2. Installation of ESP32 add-on
1.Open Arduino IDE.
2.Go to File -> Preferences.
3.Type https://dl.espressif.com/dl/package_esp32_index.json to the Additional Board Manager URLs field. Then press OK button. If you already have the ESP8266 boards URL, you can separate the URLs with a comma as follows: https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json
4.Open Boards manager. Go to Tools -> Board -> Boards Manager…
5.Look for esp or scroll down to the esp32 entry. Select the esp32 entry. When you click it an install option will appear. Check the more info, you will see the Install button appears, and press Install button to start installation.
6.Once the installation has completed, an Arduino-blue INSTALLED will appear next to the entry.
7.Congrats!!!You have installed it successfully. Let’s test it now.
3. Testing installation
1.Plug the ESP32 development board to your PC and wait for the drivers to install (or install manually any that might be required).
2.Open Arduino IDE.
3.Go to Tools -> Board -> ESP32 Arduino -> and select your ESP32 board (We have the DOIT ESP32 DEVKIT V1)
4.Select COM port that the board is attached to (if you don’t see the COM Port in your Arduino IDE, you need to install the ESP32 CP210x USB to UART Bridge VCP Drivers)
5.Open the following example under File -> Examples -> WiFi (for DOIT ESP32 DEVKIT V1) -> WiFi Scan.
6.A new sketch opens. Compile and upload the sketch to your ESP32 development board. If everything went as expected, you should see a “Done uploading” message. (You need to hold the ESP32 on-board Boot button while uploading).
7.Open the Serial Monitor at a baud rate of 115200. Press the ESP32 on-board Enable (EN) button and you should see the networks available near your ESP32.
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.
If you have the right board and COM port selected, hold-down the BOOT button on your ESP32 board.
Press Upload button in the Arduino IDE to upload your sketch. When 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.
Your ESP32 development board should have the new sketch running. Just press the ENABLE (EN) button to restart the ESP32 and run the new uploaded sketch. You will need to repeat that button sequence every time you want to upload a new sketch.
We have learnt how to install the ESP32 board in Arduino IDE whether you’re using Windows, Mac OS X or Linux.
Check for more DIY projects here.