
RP2040 vs ESP32: PIO, Radios, and Which Board to Pick
Pick the RP2040 when your project needs precise timing, custom protocols or deterministic I/O, and pick the ESP32 when your project needs Wi-Fi or Bluetooth. The RP2040 has no wireless radio at all on the base Pico, while the ESP32 has Wi-Fi and Bluetooth built in. The RP2040 wins on PIO, and the ESP32 wins on every wireless job.
RP2040 vs ESP32 at a glance
The table below uses the Raspberry Pi RP2040 Datasheet, build date 2025-02-20, build version 3184e62-clean, and the Espressif ESP32 Series Datasheet v5.3. The Pico W adds Wi-Fi, and that variant is covered in its own section below.
| Spec (unit) | RP2040 (Raspberry Pi Pico) | ESP32 (DevKit V1) |
|---|---|---|
| CPU | Dual ARM Cortex-M0+ | Dual Xtensa LX6 |
| Max clock (MHz) | 133 | 240 |
| SRAM (KB) | 264 in six banks | 520 |
| Flash (MB) | 2 on Pico, external QSPI, up to 16 supported | 4 in package typical, up to 16 external |
| GPIO pins (count) | 30, 26 on Pico header plus 4 ADC shared | 34 |
| Wi-Fi | None on base Pico; Pico W adds 2.4 GHz Wi-Fi | Wi-Fi 4, 2.4 GHz |
| Bluetooth | None on base Pico; Pico W adds BLE 5.2 | Classic plus BLE 4.2 |
| ADC | 4 external channels plus temperature sensor, 12-bit, 500 ksps | 18 channels, 12-bit, two ADC units |
| DAC | None | 2 channels, 8-bit |
| PWM channels (count) | 16, 8 slices with 2 outputs each | 16 LEDC channels |
| PIO state machines (count) | 8, in 2 blocks of 4 | None |
| UART (count) | 2 | 3 |
| SPI (count) | 2 | 2 usable |
| I2C (count) | 2 | 2 |
| USB | USB 1.1 host and device with PHY | None native, USB to serial chip on board |
| Logic voltage (V) | 3.3 | 3.3 |
| Production lifetime | Until at least January 2041 per datasheet | 15 year longevity commitment class |
One row in that table decides most projects before any other spec matters: the base RP2040 has no radio, and the ESP32 has two. If your project must connect to Wi-Fi, the base Pico is out, and the choice becomes Pico W versus ESP32, which is covered below.
What is PIO and why does it matter?
PIO stands for Programmable Input Output. The RP2040 has two PIO blocks with four state machines each, for eight state machines in total. Each state machine runs a small program written in a nine-instruction assembly language, and each PIO block holds 32 instruction slots of shared memory for its four state machines. A state machine drives GPIO pins with precise timing without using either main CPU core. That makes PIO the RP2040 feature with no equivalent on the ESP32.
PIO programs implement protocols in software that would otherwise need dedicated hardware. Common uses are WS2812 LED strips, VGA output, I2S audio, custom serial protocols and precise pulse trains. A PIO state machine can bit bang a protocol at a fixed clock rate while both Cortex-M0+ cores run your application code. The timing stays deterministic because the state machine is not interrupted by Wi-Fi, USB or a scheduler.
The ESP32 has no PIO. It has an RMT peripheral for pulse trains and an I2S peripheral for audio, and those cover many of the same jobs, but they are fixed function blocks. When a project needs a protocol that no fixed peripheral speaks, the RP2040 implements it in PIO and the ESP32 needs bit banging on a core that is also running Wi-Fi. For a robotics project that drives a custom sensor bus or a precise stepper pulse train, PIO is a real advantage.
How do the radios compare?
The base Raspberry Pi Pico has no Wi-Fi and no Bluetooth. It is a wired microcontroller. The Raspberry Pi Pico W adds a 2.4 GHz Wi-Fi radio and Bluetooth 5.2, using an Infineon CYW43439 wireless chip connected over SPI. The Pico W is the board to compare with the ESP32 when wireless matters.
The ESP32 has Wi-Fi 4 and Bluetooth Classic plus BLE 4.2 on the same chip, with an antenna on the module. Its Wi-Fi stack is mature, its Arduino and ESP-IDF support is deep, and it handles a web server, an MQTT client and Bluetooth at once on two cores at 240 MHz. The Pico W handles Wi-Fi well for sensor posting and simple web serving, but its single SPI link to the wireless chip and its 133 MHz cores give it less headroom for a heavy network load plus application code.
Choose the ESP32 when the network is the project: a web dashboard, a camera stream, a Bluetooth link or an MQTT fleet. Choose the Pico W when the project is mostly local I/O with occasional Wi-Fi, such as a sensor that posts a reading every minute. Choose the base Pico when the project has no wireless need at all.
How do CPU, memory and GPIO compare?
The ESP32 is the faster chip on paper: two Xtensa LX6 cores at 240 MHz against two Cortex-M0+ cores at 133 MHz. The ESP32 also has twice the SRAM, at 520 KB against 264 KB. For number crunching, network stacks and displays, the ESP32 is faster. For deterministic I/O, the RP2040 closes the gap, because PIO and DMA move data without the CPU, and the six independent SRAM banks let both cores and the DMA controller work in parallel without bus contention.
GPIO counts are close: 30 multifunction pins on the RP2040 against 34 on the ESP32. The RP2040 puts every GPIO on a flexible pin mux, so any peripheral can use almost any pin, and all 30 pins support PIO. The ESP32 has more fixed function pins and more ADC channels, at 18 against 4 external channels on the RP2040. If your project reads six analog sensors, the ESP32 fits and the RP2040 does not. If your project needs eight PWM outputs with precise timing, both fit, and the RP2040 PIO option is stronger.
Flash differs in form. The Pico carries 2 MB of external QSPI flash and supports up to 16 MB. The ESP32 DevKit V1 typically carries 4 MB in package. Both are ample for Arduino or MicroPython projects. The RP2040 has no on chip flash at all, so its program always lives in external flash, while the ESP32 executes from its own flash and PSRAM options.
Which is easier to program?
Both boards run MicroPython and Arduino, and both have a C SDK. The Pico is the simpler first board for MicroPython: hold BOOTSEL, plug in USB, drop the UF2 file on the drive that appears, and the board reboots into MicroPython. The ESP32 needs esptool or Thonny to flash MicroPython firmware over serial, which is one more step and one more driver.
For Arduino, the ESP32 has the larger example base, because it has been in the Arduino ecosystem longer and its Wi-Fi examples are everywhere. The Pico Arduino core is solid and growing, and it covers the same sensor and display libraries, but a search for a Pico Wi-Fi example returns fewer results than the same search for the ESP32. For C development, the Pico SDK is clean and well documented, and the ESP-IDF is more powerful and more complex.
Debugging favours the Pico. The RP2040 has a SWD debug port and the Pico exposes it on three pins, so a low cost debug probe gives breakpoints and single stepping. The ESP32 has JTAG debugging too, but on the DevKit V1 it goes through the same USB to serial path and is less direct for a beginner.
Which board should you pick for each project?
| Project type | Pick this board | Why |
|---|---|---|
| Wi-Fi sensor dashboard | ESP32 | Native Wi-Fi, 520 KB SRAM, mature web server examples |
| Bluetooth link or beacon | ESP32 | Bluetooth Classic plus BLE on chip |
| WS2812 LEDs or custom protocol | RP2040 | PIO state machines drive timing without CPU load |
| Precise stepper or pulse train | RP2040 | PIO plus DMA gives deterministic timing |
| USB HID device or MIDI | RP2040 | Native USB 1.1 host and device with PHY |
| Many analog sensors | ESP32 | 18 ADC channels against 4 on the RP2040 |
| Low cost learning board | RP2040 | Simple MicroPython flash path, low price, PIO to explore |
| Camera or display plus Wi-Fi | ESP32, or ESP32-S3 | PSRAM and camera interface, see the ESP32 family post |
The Pico W sits between the two columns: it is the RP2040 pick when a project needs PIO plus occasional Wi-Fi. It costs more than the base Pico and less than a full ESP32 setup in many builds, and it keeps the PIO advantage while adding a radio.
What about Pico W vs ESP32?
Pico W versus ESP32 is the fair wireless comparison. The Pico W has Wi-Fi and Bluetooth 5.2 through its CYW43439 chip. The ESP32 has Wi-Fi and Bluetooth on chip. The ESP32 wins on network headroom, on Bluetooth Classic support and on the size of its Wi-Fi example base. The Pico W wins on PIO, on native USB and on the simplicity of its MicroPython path.
For a battery sensor that wakes, reads a sensor and posts over Wi-Fi, either board works, and the Pico W often draws less power in the application because its cores run at 133 MHz. For a web server that serves a dashboard to several clients at once, the ESP32 is the safer pick. For a USB keyboard, a MIDI controller or a WS2812 project that also posts to Wi-Fi, the Pico W is the only board here that does both jobs well.
For the Pico pins behind this comparison, see the Raspberry Pi Pico pinout guide.
FAQ
Does the Raspberry Pi Pico have Wi-Fi?
No, the base Pico has no wireless radio. The Pico W adds 2.4 GHz Wi-Fi and Bluetooth 5.2. Check the board name before you buy, because the two boards look alike.
Is the RP2040 faster than the ESP32?
No, on raw CPU speed the ESP32 is faster, with two cores at 240 MHz against two cores at 133 MHz. The RP2040 is faster at deterministic I/O, because its eight PIO state machines handle timing without CPU load.
Can the Pico run Arduino code?
Yes. The Arduino Pico core supports the RP2040 in the Arduino IDE, and most sensor and display libraries work on it. Wi-Fi code for the Pico W uses different libraries from ESP32 Wi-Fi code.
Which is better for a robot car?
The ESP32 is better when the car needs Wi-Fi control or telemetry. The RP2040 is better when the car needs precise motor timing or a custom sensor protocol. A car with both needs is a Pico W or an ESP32 with a separate PIO style approach, and the deciding factor is which requirement is stricter.
What is PIO used for in practice?
PIO drives WS2812 LED strips, VGA output, I2S audio, custom serial buses and precise pulse trains. Each state machine runs a small program that drives GPIO pins at a fixed rate while the main cores run your code.
Parts used
Raspberry Pi Pico Development Board, 2-Pack: the base RP2040 board for PIO, USB and deterministic I/O projects. ESP32 DevKit V1 Development Board, 30-Pin WROOM-32: the ESP32 board for Wi-Fi, Bluetooth and networked projects.
Sources
- Raspberry Pi RP2040 Datasheet, build date 2025-02-20, build version 3184e62-clean
- Espressif ESP32 Series Datasheet v5.3
- Raspberry Pi RP2040 Product Brief, August 2022
Last updated: 2026-11-21. Search volume: not verified. Product links use the store short link form with the product ID; confirm the product slug at publish time.
