Getting Started with ESP32

    Atul Kabra4 min readUpdated

    Getting Started with ESP32

    The ESP32 is a low-cost, powerful microcontroller board with built-in Wi-Fi and Bluetooth, which makes it the go-to choice for IoT projects. You program it with the same Arduino IDE and the same Arduino-style code you already know, so moving from an Arduino Uno to an ESP32 is a small step that unlocks wireless, internet-connected projects. If you have done the basics, the ESP32 is your natural next board.

    If IoT is new to you, pair this guide with What is IoT?.

    Why Choose the ESP32?

    • Built-in Wi-Fi and Bluetooth — no extra module needed for connectivity.
    • More power than an Uno — a faster processor and more memory, so it handles bigger programs.
    • Many pins — plenty of inputs and outputs for sensors and actuators.
    • Same Arduino workflow — you keep the IDE, the setup()/loop() structure, and the libraries you know.

    These strengths are exactly why the ESP32 appears throughout Your First IoT Project and the final-year project ideas.

    Adding ESP32 Support to the Arduino IDE

    The ESP32 is not included in the IDE by default; you add it through the Board Manager. Make sure you have the Arduino IDE 2.x installed as described in Setting Up the Arduino IDE, then:

    1. Open the IDE settings and add the official Espressif ESP32 boards URL to the "Additional boards manager URLs" field (find the current URL in the official ESP32 Arduino documentation).
    2. Open the Boards Manager from the sidebar, search for "esp32," and install the Espressif package.
    3. Connect your ESP32 by USB and select your specific ESP32 board and its port from the board dropdown.

    After this, the ESP32 is just another board you can compile and upload to.

    A Few Things That Differ from the Uno

    • Voltage is 3.3 V, not 5 V. Do not feed 5 V into ESP32 pins, and check that sensors are 3.3 V compatible.
    • Pin numbers differ. ESP32 pins are referenced by their GPIO numbers; check your board's pinout diagram.
    • Higher baud rate. Examples often use 115200 in Serial.begin().
    • Some boards need a button hold to upload. A few low-cost ESP32 boards require holding a "BOOT" button while uploading starts.

    Want to learn this properly?

    Join the waitlist for our courses — beginner-friendly, project-first classes in Jalgaon.

    Browse courses

    Your First ESP32 Sketch: Connect to Wi-Fi

    This sketch connects the ESP32 to your Wi-Fi network and prints its IP address. It uses the WiFi library that comes with the ESP32 board package.

    // Connect an ESP32 to Wi-Fi and print its IP address.
    // Replace the placeholders with your own network name and password.
    
    #include <WiFi.h>   // comes with the ESP32 board package
    
    const char* ssid     = "YOUR_WIFI_NAME";      // your network name
    const char* password = "YOUR_WIFI_PASSWORD";  // your network password
    
    void setup() {
      Serial.begin(115200);   // ESP32 commonly uses 115200 baud
      delay(1000);
    
      Serial.print("Connecting to Wi-Fi");
      WiFi.begin(ssid, password);   // start the connection
    
      // Wait until connected, printing a dot each second.
      while (WiFi.status() != WL_CONNECTED) {
        delay(1000);
        Serial.print(".");
      }
    
      Serial.println();
      Serial.print("Connected! IP address: ");
      Serial.println(WiFi.localIP());   // show the assigned IP
    }
    
    void loop() {
      // Nothing here yet — connecting once is enough for this first test.
    }
    

    Open the Serial Monitor at 115200 baud, and once connected you will see an IP address. That confirms your ESP32 is on the network and ready for real IoT work.

    Common Mistakes

    • Feeding 5 V into pins. The ESP32 runs at 3.3 V logic; 5 V on a GPIO can damage it.
    • Wrong board selected. With many ESP32 variants, pick the one that matches your hardware, or uploads fail.
    • Baud rate mismatch. If the Serial Monitor shows garbage, set it to 115200 to match the sketch.
    • Wi-Fi credentials typos. A wrong network name or password leaves it stuck "connecting" forever. Double-check both.
    • Upload fails silently. Some boards need the BOOT button held during upload; check your board's notes.

    FAQ

    Is the ESP32 harder than the Arduino Uno? Not really. The code style is the same. The main new things are 3.3 V logic and the one-time board installation.

    Can I run my old Arduino sketches on it? Many work with little or no change, though pin numbers and voltage differences may need attention.

    Do I still need an Arduino Uno? The Uno is great for learning basics and 5 V components. The ESP32 shines when you need wireless or more power.

    Take the ESP32 Further

    The ESP32 turns your skills into connected, real-world devices. To build complete IoT and robotics projects with it under guidance, join the waitlist for the Robotics & Automation course at Infoplanet in Jalgaon.

    Want to learn this properly?

    Join the waitlist for our courses — beginner-friendly, project-first classes in Jalgaon.

    Browse courses
    Atul Kabra

    Founder, Infoplanet

    Atul Kabra founded Infoplanet in 2001 and has spent over two decades teaching programming — C, C++, Java, databases and more — to students across Maharashtra.

    Related guides