TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/esphome/esphome.io/llms.txt
Use this file to discover all available pages before exploring further.
rp2040: component enables ESPHome support for Raspberry Pi’s RP2040 and RP2350 microcontrollers, including the popular Raspberry Pi Pico and Pico W boards. The RP2040 is a dual-core ARM Cortex-M0+ chip, while the RP2350 (used in Pico 2 and Pico 2 W) adds Cortex-M33 cores with optional RISC-V support. Network connectivity on wireless Pico boards is provided by the Infineon CYW43439 Wi-Fi/Bluetooth chip. Wired Ethernet is available via SPI controllers such as the W5500 or ENC28J60. The build system uses the arduino-pico framework, which supports over 140 boards.
The Raspberry Pi Pico W and other RP2040/RP2350 boards with the CYW43439 chip are supported and tested. Boards using ESP-AT Wi-Fi modules (including some clones labeled
RP2040 Pico W-2023) are not supported.Minimal Example
Configuration Variables
The PlatformIO board identifier for your RP2040/RP2350 board. Common values:
rpipicow— Raspberry Pi Pico W (RP2040 + CYW43439 Wi-Fi)rpipico— Raspberry Pi Pico (RP2040, no wireless)rpipico2w— Raspberry Pi Pico 2 W (RP2350 + CYW43439)rpipico2— Raspberry Pi Pico 2 (RP2350, no wireless)
Hardware watchdog timeout. If the device hangs for this duration, it reboots. Maximum is
8388ms. Set to 0s to disable the watchdog entirely. Defaults to 8388ms.Enable full
FILE*-based printf support. Disabled by default, saving ~9.2 KB of flash. Set to true only if an external component requires FILE*-based printf. Defaults to false.First-Time Flashing (BOOTSEL Mode)
RP2040/RP2350 boards are flashed via USB as a mass-storage device. For the first flash:- Unplug the board from USB.
- Hold the BOOTSEL button.
- Plug in the USB cable while holding the button.
- Release the button — the board appears as a USB drive (
RPI-RP2). - Run
esphome run your_config.yaml. ESPHome detects the mounted drive and uploads the UF2 firmware automatically.
picotool upload protocol resets the device into BOOTSEL mode automatically.
GPIO Pin Names
ESPHome supports symbolic pin names for RP2040 boards with known pin mappings:| Pin Name | Pico W GPIO | Description |
|---|---|---|
LED | 64 (CYW43) | Onboard LED (wireless chip controlled) |
SDA | GPIO 4 | Default I²C data |
SCL | GPIO 5 | Default I²C clock |
SDA1 | GPIO 26 | Secondary I²C data |
SCL1 | GPIO 27 | Secondary I²C clock |
MISO | GPIO 16 | Default SPI MISO |
MOSI | GPIO 19 | Default SPI MOSI |
SCK | GPIO 18 | Default SPI clock |
SS | GPIO 17 | Default SPI chip select |
TX | GPIO 0 | Default UART TX |
RX | GPIO 1 | Default UART RX |
On boards with the CYW43439 chip (Pico W, Pico 2 W), the onboard LED is connected to the wireless chip — not a standard GPIO pin. It is accessible as pin
64 or the LED name and supports output mode only.Onboard LED Example
Complete Pico W Example
Wired Ethernet (W5500)
Pico boards can use SPI Ethernet controllers like the W5500. See the Ethernet component for the full reference.Serial Debugging
By default, ESPHome logs over USB CDC. If the device fails to boot or USB CDC does not enumerate, use a hardware UART adapter:| Signal | Pico W Pin | Adapter |
|---|---|---|
| TX | GPIO 0 (TX) | RX |
| RX | GPIO 1 (RX) | TX |
| GND | Any GND | GND |