The ESP32 is one of the most versatile microcontrollers you can get your hands on. WiFi, Bluetooth, dual-core processor, and a ton of GPIO pins — all for a few dollars. Here's how to get up and running.

What You'll Need

  • An ESP32 development board (any variant works)
  • USB-C or Micro-USB cable
  • Arduino IDE or PlatformIO

Setting Up the Arduino IDE

First, add the ESP32 board manager URL to your Arduino IDE preferences:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

Then go to Tools → Board → Board Manager, search for "ESP32", and install the package by Espressif.

The Classic Blink

void setup() {
    pinMode(2, OUTPUT);  // Built-in LED on most boards
}

void loop() {
    digitalWrite(2, HIGH);
    delay(500);
    digitalWrite(2, LOW);
    delay(500);
}

Upload, and you should see the onboard LED blinking. Simple, but satisfying.

Connecting to WiFi

#include <WiFi.h>

void setup() {
    Serial.begin(115200);
    WiFi.begin("your-ssid", "your-password");

    while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
    }

    Serial.println("\nConnected!");
    Serial.println(WiFi.localIP());
}

void loop() {}

From here, the possibilities are endless — web servers, MQTT, sensor networks, home automation. The ESP32 is the Swiss Army knife of the maker world.

What's Next

In upcoming posts, we'll look at deep sleep modes for battery-powered projects and setting up ESP-NOW for mesh networking between boards.