Consentium IoT
HomeTutorialsMain siteBlog
  • Getting Started
    • Consentium IoT Platform usage
    • Sensor Data API Documentation
    • Steps for Using Consentium IoT's OTA Service
    • Consentium Edge Machine Learning
    • ConsentiumNow Library Documentation
    • EdgeModelKit: Sensor Data Acquisition and Logging Library
  • Code usage
    • ConsentiumThings Python API
    • ConsentiumThings Arduino API
    • ConsentiumThings Arduino API with OTA Updates
    • WiFi auto connect API
    • ConsentiumThings Arduino Data Receiver API
    • ConsentiumNow Library API
  • Edge boards
    • Consentium Edge Dalton board
  • Tutorials
    • Receiving sensor data
      • Receiving Sensor Data from Consentium IoT Cloud and Controlling LED
    • Sending sensor data
      • Sending LM35 Sensor Data to Consentium IoT Cloud
      • Sending DHT11 Sensor Data to Consentium IoT Cloud
    • Edge machine learning
      • Sine wave predictor
      • Sine wave predictor with IoT
      • TinyML Occupancy Classification Example with Consentium IoT
  • Board support
    • Adding NodeMCU support to Arduino IDE
    • Adding ESP32 Support to Arduino IDE
    • Programming Raspberry Pi Pico with Arduino IDE (Pico W Compatible)
Powered by GitBook
On this page
  • Here's how to program the ESP32 using the Arduino IDE.
  • Step 1: Connect your ESP32 to your computer
  • Step 2: Open Arduino IDE
  • Step 3: Make a LED Blink using ESP32

Was this helpful?

  1. Board support

Adding ESP32 Support to Arduino IDE

PreviousAdding NodeMCU support to Arduino IDENextProgramming Raspberry Pi Pico with Arduino IDE (Pico W Compatible)

Last updated 9 months ago

Was this helpful?

Here's how to program the ESP32 using the Arduino IDE.

Step 1: Connect your ESP32 to your computer

You'll need a USB micro B cable to connect your ESP32 to your computer. Once connected, the power LED will light up on the board. If your computer doesn't automatically recognize the ESP32, you may need to install the CP2102 driver from .

Step 2: Open Arduino IDE

Ensure you are using Arduino IDE version 1.8.5 or later. Here's how to set up ESP32 in the IDE:

  1. Go to File > Preferences in the Arduino IDE.

  2. In the "Additional Boards Manager URLs" field, paste the following URL: https://dl.espressif.com/dl/package_esp32_index.json Then, click OK.

    Preferences
  3. Next, go to Tools > Board > Board Manager.

  4. In the search bar, type "esp32" and select the "esp32 by Espressif Systems" option. Click Install.

    Board Manager

Step 3: Make a LED Blink using ESP32

Now that your IDE is ready, let's upload a simple blink program.

Just like NodeMCU, the ESP32 has multiple GPIO pins. Refer to the ESP32 pinout below for pin naming conventions:

For this example, we'll use GPIO23 to blink an LED. Connect the LED to GPIO23 and upload the following code:

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 23 as an output.
  pinMode(23, OUTPUT);
}
 
// the loop function runs over and over again forever
void loop() {
  digitalWrite(23, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(23, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}
ESP32 Pinout
this link