What the ESP32 is
A dual-core 240 MHz microcontroller with Wi-Fi and Bluetooth in it, for less than an Arduino Uno costs. Here is what that actually changes, and what it does not.
One chip, one price, one difference
Everything below the radio line is a faster Arduino: more RAM, more pins, more flash, 32 bits instead of 8. That is nice and it is not why anybody switched.
The radio is why. A network connection turns a project that prints to a serial monitor into one that reports from the garage, and it arrived at a price that made the choice stop being a choice.
It is a family, not a chip
"ESP32" names about six different chips, and they disagree on the things you are about to depend on — the C3 has no DAC and no touch pins, the P4 has no radio, only some of them have PSRAM. Every article here carries a line saying which chips it applies to, and greys itself out on the ones it does not.
If you have not bought yet, start with the comparison. If you already own one, pick it from the selector at the top of any page and the code samples follow.
What it is not
It is not a Raspberry Pi. There is no Linux, no filesystem to speak of, no package manager, and 520 kB of RAM — a Python script that loads a CSV into memory has already lost. It boots in under a second and runs one program forever, which is exactly what you want for a sensor on a wall and exactly wrong for anything with a screen and a web browser on it.
It is also not 5 V tolerant. Every pin is a 3.3 V pin, and the older sensors and shields you may already own are not.
The code
The shortest proof that this is a different kind of board. No wiring, no libraries to install, no account to make — it lists the Wi-Fi networks around you.
#include <WiFi.h>
void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.disconnect();
int n = WiFi.scanNetworks();
Serial.printf("%d networks\n", n);
for (int i = 0; i < n; i++) {
Serial.printf("%-24s %4d dBm %s\n",
WiFi.SSID(i).c_str(),
WiFi.RSSI(i),
WiFi.encryptionType(i) == WIFI_AUTH_OPEN ? "open" : "");
}
}
void loop() {}Nothing an Uno can run comes close to this. The radio, the TCP/IP stack and the antenna are all already on the board you are holding.
The same thing, typed straight into the REPL. There is no compile step and no upload — the board is running an interpreter and you are talking to it.
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
for ssid, bssid, ch, rssi, auth, hidden in wlan.scan():
print("%-24s %4d dBm" % (ssid.decode(), rssi))Being able to poke at hardware line by line is most of the argument for MicroPython. It is also slower and uses more RAM, which is most of the argument against.
When it does not work
Almost always a 5 GHz-only network. The classic ESP32, the S3 and the C3 have 2.4 GHz radios and nothing else, so a router running in 5 GHz-only mode is invisible to them. This surprises people with new routers more than anything else on this page.
Check whether it is a P4. The P4 is the one member of the family with no radio at all — it pairs with a C6 companion chip over SDIO. If the silkscreen says P4 and there is only one module on the board, it cannot join a network.
Libraries that poke AVR registers directly — most software-serial, most timer and most PWM libraries — will not build here. The ESP32 has its own peripherals with their own names. Look for the ESP32 fork before you assume the sketch is broken.
Three ways to program this chip, and the honest reason to pick each one. Then you install one of them and never think about it again.
Choosing your tools →Edit this page — content/esp32/what-the-esp32-is.mdx
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.