ESP32 Overview: WiFi, Bluetooth, and Dual-Core Power
The ESP32 is a powerful microcontroller from Espressif that includes WiFi, Bluetooth, dual-core processing, and deep sleep — all in a compact package.
Key idea:
The ESP32 has a dual-core Xtensa LX6 processor running up to 240 MHz, 4MB flash, 520KB SRAM, built-in WiFi and Bluetooth 5.0, and 34 GPIO pins.
ESP32 vs Arduino Uno
| Feature | Arduino Uno | ESP32 |
|---|---|---|
| Processor | ATmega328P (8-bit, 16 MHz) | Xtensa LX6 dual-core (32-bit, up to 240 MHz) |
| Flash | 32 KB | 4 MB (typical) |
| RAM | 2 KB | 520 KB |
| WiFi | No (needs shield) | Built-in 802.11 b/g/n |
| Bluetooth | No | Bluetooth 5.0 + BLE |
| GPIO | 14 digital, 6 analog | 34 GPIO, 18 ADC channels |
| Power modes | None | Light sleep, deep sleep |
Pinout Overview
Key ESP32 pins:
┌─────────────────────────────────────────┐
│ ESP32 DevKit V1 │
├─────────────────────────────────────────┤
│ 3V3 GND EN VP VN 34 35 32 33 │
│ 25 26 27 14 12 13 D2 D4 16 17 │
│ 5 18 19 21 22 23 15 2 4 0 │
│ TX0 RX0 4 1 3 5 6 7 8 9 │
└─────────────────────────────────────────┘
- GPIO 0-39 — Most can be inputs or outputs
- GPIO 34-39 — Input-only (no internal pull-up)
- GPIO 2 — Built-in LED on most DevKit boards
- ADC1 (GPIO 32-39) — Available when WiFi is off
- ADC2 (GPIO 0, 2, 4, 12-15, 25-27) — Not usable when WiFi is active
Installing ESP32 Board Support in Arduino IDE
- Open Arduino IDE
- Go to File → Preferences
- Add to Additional Boards Manager URLs:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - Go to Tools → Board → Boards Manager...
- Search "ESP32" and install esp32 by Espressif Systems
- Select your board: Tools → Board → ESP32 Arduino → DOIT ESP32 DEVKIT V1
Your First ESP32 Sketch
void setup() {
Serial.begin(115200);
pinMode(2, OUTPUT); // Built-in LED on GPIO 2
}
void loop() {
digitalWrite(2, HIGH);
delay(500);
digitalWrite(2, LOW);
delay(500);
}ESP32 Programming Modes
The ESP32 has two programming modes:
- Normal mode — Runs your sketch
- Bootloader mode — Used for flashing new code (hold BOOT button while pressing RESET)
Key Takeaways
- ESP32 is a dual-core 32-bit microcontroller with WiFi + Bluetooth
- 4MB flash, 520KB RAM, up to 240 MHz
- Use ADC1 channels (GPIO 32–39) when WiFi is active
- Install ESP32 board support via Boards Manager
- Built-in LED typically on GPIO 2
Resources
- Espressif ESP32 Datasheet: https://www.espressif.com/sites/default/documentation/datasheets/en/esp32-pio-datasheet-en.pdf
- Espressif ESP32 Programming Guide: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/
- Video: ESP32 Arduino Core Setup - https://www.youtube.com/watch?v=8NuJub-jMOQ
- Random Nerd Tutorials ESP32: https://randomnerdtutorials.com/projects-esp32/