Overview

The ESP32 is a family of microcontrollers designed by Espressif Systems (Shanghai). The defining feature across the family is integrated Wi-Fi and/or Bluetooth at a price point of $2–5 per chip, which made it the dominant platform for hobbyist and commercial IoT devices. Espressif has shipped hundreds of millions of units.

“ESP32” refers to both the original 2016 chip and the broader family. The variants differ in CPU architecture, wireless capabilities, and peripheral set:

ChipCPU CoreWi-FiBluetoothUSBDistinguishing Feature
ESP32 (2016)Dual Xtensa LX6 @ 240 MHz802.11 b/g/nClassic BT + BLE 4.2None (UART only)The original; still widely deployed
ESP32-S2Single Xtensa LX7 @ 240 MHz802.11 b/g/nNoneUSB-OTGCheaper, no Bluetooth, native USB
ESP32-S3Dual Xtensa LX7 @ 240 MHz802.11 b/g/nBLE 5.0USB-OTGVector instructions for ML, more GPIO, PSRAM support
ESP32-C3Single RISC-V @ 160 MHz802.11 b/g/nBLE 5.0USB-SerialUltra-low-cost (~$1.50), RISC-V core
ESP32-C6Single RISC-V @ 160 MHz802.11 b/g/n/ax (Wi-Fi 6)BLE 5.0 + 802.15.4USB-SerialWi-Fi 6, Thread/Zigbee
ESP32-H2Single RISC-V @ 96 MHzNoneBLE 5.0 + 802.15.4USB-SerialThread/Zigbee/Matter only, no Wi-Fi

The S3 is the current default choice for new projects: dual-core, native USB (no external USB-to-UART bridge needed), commonly ships with 8MB PSRAM (external pseudo-static RAM addressed transparently by the chip), and has the broadest library/tutorial support. The C3 is the cost-optimized choice when BLE and Wi-Fi suffice and you don’t need dual cores or large PSRAM. The C6 is emerging for Matter/Thread smart-home applications.

Development Frameworks

Three frameworks target ESP32, with fundamentally different philosophies:

ESP-IDF (Espressif IoT Development Framework) is Espressif’s official C/C++ SDK. It’s built on FreeRTOS and provides drivers for every ESP32 peripheral, plus networking stacks (TCP/IP, MQTT, HTTP, TLS). This is what professional ESP32 products use. It’s powerful but has a steep learning curve and a CMake-based build system.

Arduino — Espressif maintains an Arduino core for ESP32 that maps Arduino APIs (digitalWrite(), SPI.transfer(), WiFi.begin()) onto ESP-IDF internals. The programming model is simplified C++ with setup() and loop(). The library ecosystem is enormous — GxEPD2 for e-paper, TFT_eSPI for LCDs, FastLED for LEDs, etc. The tradeoff is reduced control: you can’t easily configure FreeRTOS task priorities, custom partition tables, or low-level power management.

esp-hal is the Rust HAL for ESP32 chips, implementing the embedded-hal traits. It provides direct peripheral access in safe Rust without FreeRTOS underneath. It can be used standalone or with an async executor. It is a separate project from Embassy’s embassy-stm32, though both implement the same embedded-hal trait interface, so driver crates (like epd-waveshare) work with either. For combined ESP32 + async, the integration is via esp-hal-embassy.

Important

ESP32’s Xtensa cores (original, S2, S3) require a custom Rust compiler fork (esp-rs/rust), since Xtensa is not an upstream LLVM target. The RISC-V variants (C3, C6, H2) work with standard stable Rust since RISC-V is an upstream target. This is a meaningful consideration if you prefer staying on mainstream toolchains.

ESP32 vs STM32: When to Choose Each

The ESP32’s decisive advantage is built-in Wi-Fi and Bluetooth. If your project needs wireless connectivity, an ESP32 provides it for $3 at zero additional BOM cost. Adding Wi-Fi to an STM32 requires an external module, extra wiring, and a more complex firmware stack.

The STM32 family’s advantages are peripheral richness (advanced timers, hardware crypto, camera interface, LCD controller, CAN bus — features the ESP32 lacks or has in limited form), real-time determinism (the Cortex-M NVIC gives precise interrupt latency guarantees that FreeRTOS-on-Xtensa cannot match), industrial temperature ratings (-40°C to +125°C), and the depth of the professional ecosystem (safety certifications, long-term availability guarantees, automotive qualifications).

For a desk display with hardcoded sentences, either works. The STM32 teaches you more about embedded fundamentals; the ESP32 adds wireless capability at a lower price point. See Microcontrollers vs Single-Board Computers for the broader MCU vs SBC comparison.