1.3 Install the ESP32 Board(Important)

To program the ESP32 microcontroller, we need to install the ESP32 board package in the Arduino IDE. Follow the step-by-step guide below:

Install the ESP32 Board

  1. Open the Arduino IDE. Go to File and select Preferences from the drop-down menu.

    ../../_images/install_esp321.png
  2. In the Preferences window, locate the Additional Board Manager URLs field. Click on it to activate the text box.

    ../../_images/install_esp322.png
  3. Add the following URL to the Additional Board Manager URLs field: https://espressif.github.io/arduino-esp32/package_esp32_index.json. This URL points to the package index file for the ESP32 boards. Click the OK button to save the changes.

    ../../_images/install_esp323.png
  4. In the Boards Manager window, type ESP32 in the search bar. Click the Install button to start the installation process. This will download and install the ESP32 board package.

    ../../_images/install_esp324.png
  5. Congratulations! You have successfully installed the ESP32 board package in the Arduino IDE.

Upload the Code

  1. Now, connect the ESP32 WROOM 32E to your computer using a Micro USB cable.

    ../../_images/plugin_esp32.png
  2. Then select the correct board, ESP32 Dev Module, by clicking on Tools -> Board -> esp32.

    ../../_images/install_esp325.png
  3. If your ESP32 is connected to the computer, you can choose the correct port by clicking on Tools -> Port.

    ../../_images/install_esp326.png
  4. Additionally, Arduino 2.0 introduced a new way to quickly select the board and port. For ESP32, it is usually not automatically recognized, so you need to click on Select other board and port.

    ../../_images/install_esp327.png
  5. In the search box, type ESP32 Dev Module and select it when it appears. Then, choose the correct port and click OK.

    ../../_images/install_esp328.png
  6. Afterward, you can select it through this quick access window. Note that during subsequent use, there may be times when ESP32 is not available in the quick access window, and you will need to repeat the above two steps.

    ../../_images/install_esp329.png
  7. Both methods allow you to select the correct board and port, so choose the one that suits you best. Now, everything is ready to upload the code to the ESP32.