The Arduino IDE is the core of your development environment for programming the ESP32. In this article, I’ll show you how to set up the IDE, install the necessary libraries, and prepare the ESP32 for your projects. Since there are many guides and videos available online, this will be a concise documentation of the steps needed to enable ESP32 support in the Arduino IDE.

Step 1: Download and Install Arduino IDE

  1. Visit the official Arduino website: Arduino IDE Download
  2. Download the latest version of the Arduino IDE for your operating system.
  3. Install the IDE by running the downloaded file and following the instructions.

Step 2: Add ESP32 Board

  1. Open the Arduino IDE and go to File > Preferences.
  2. In the Additional Board Manager URLs field, add the following URLs:
    • https://dl.espressif.com/dl/package_esp32_index.json
    • https://raw.githubusercontent.com/ricardoquesada/esp32-arduino-lib-builder/master/bluepad32_files/package_esp32_bluepad32_index.json
  3. Click OK to confirm.
Robot ESP32 - Arduino IDE

Robot ESP32 – Arduino IDE

Note

If you already have other URLs in this field, separate them with a comma or a new line.

  1. Go to Tools > Board > Board Manager.
  2. Search for “ESP32” and install the package from Espressif Systems.
  3. You should also see the board package esp32_bluepad32.

The following image shows the two entries:

Robot ESP32 libraries installation

Robot ESP32 libraries installation

Step 3: Install Required Libraries

To equip the ESP32 with the desired functions, you’ll need to install some additional libraries:

  1. Open the Library Manager: Tools > Manage Libraries.
  2. Search for and install the following libraries:
    • Adafruit PWM Servo Driver: For controlling servos and motors.
    • Bluepad32: For connecting PS4 and PS5 controllers.
    • Adafruit NeoPixel: For controlling WS2812 LEDs.
    • SSD1306Wire: For OLED displays.

Step 4: Connect ESP32 to Your Computer

  1. Connect your ESP32 to your computer using a USB cable.
  2. Go to Tools > Board and select “ESP32 Dev Module.”
  3. Go to Tools > Port and select the COM port corresponding to your ESP32.

Step 5: Upload a Test Sketch

To ensure everything works, let’s upload a simple test sketch:

  1. Open a new sketch window and paste the following code:
    void setup() {
      Serial.begin(115200);
      Serial.println("ESP32 is ready!");
    }
    
    void loop() {
      delay(1000);
      Serial.println("Hello, ESP32!");
    }
  2. Click the upload button (arrow icon) to upload the sketch to the ESP32.
  3. Open the Serial Monitor (Tools > Serial Monitor) and check the output.

Summary

With these steps, your ESP32 is ready for exciting projects. You’ve installed the Arduino IDE, integrated the ESP32, and added all the necessary libraries. In the next article, I’ll explain how to bring your robot to life with software. Good luck experimenting!



Artikel Übersicht ESP32 Roboter Auto:

ESP32 Dev Kit C V4 – Build Your Own Robot Car – Project Kickoff
ESP32 Dev Kit C V4 – Build Your Own Robot Car – Electronics and Components
ESP32 Dev Kit C V4 – Build Your Own Robot Car – Chassis Examples
ESP32 Dev Kit C V4 – Build Your Own Robot Car – Power Supply
ESP32 Dev Kit C V4 – Build Your Own Robot Car – Power Supply Wiring
ESP32 Dev Kit C V4 – Build Your Own Robot Car – Logical Wiring
ESP32 Dev Kit C V4 – Build Your Own Robot Car – Setting Up the Arduino Development Environment
ESP32 Dev Kit C V4 – Build Your Own Robot Car – The Robot Software