The YD-RP2040 is a popular, cost-effective third-party development board based on the Raspberry Pi RP2040 microcontroller. While it shares the same dual-core Arm Cortex-M0+ silicon as the official Pi Pico, the YD-RP2040 features a different physical footprint, a USB-C connector, and an onboard WS2812B RGB LED. If you are migrating from a Pico or wiring up sensors, you need the exact YD-RP2040 pinout to avoid mapping errors and hardware damage.
Below is the direct hardware reference. Use this table to map your physical wires to the correct MicroPython or C/C++ SDK GPIO assignments.
Complete YD-RP2040 Pinout Reference Table
The RP2040 chip features highly flexible pin multiplexing, meaning almost any GPIO can be mapped to I2C, SPI, or UART. However, the YD-RP2040 silkscreen highlights specific default routes. The table below details the physical pins, their default bus assignments, and board-specific hardware ties.
| GPIO Pin | Silkscreen Label | Primary Function | Alternate Mux (I2C/SPI/UART) | YD-RP2040 Specific Notes |
|---|---|---|---|---|
| GP0 | GP0 / TX0 | Digital I/O / UART0 TX | I2C0 SDA, SPI0 RX | Standard 3.3V logic |
| GP1 | GP1 / RX0 | Digital I/O / UART0 RX | I2C0 SCL, SPI0 CSn | Standard 3.3V logic |
| GP2 | GP2 | Digital I/O | I2C1 SDA, SPI0 SCK | Standard 3.3V logic |
| GP3 | GP3 | Digital I/O | I2C1 SCL, SPI0 TX | Standard 3.3V logic |
| GP4 | GP4 / SDA0 | I2C0 SDA | SPI0 RX, UART1 TX | Pulled up on some YD batches |
| GP5 | GP5 / SCL0 | I2C0 SCL | SPI0 CSn, UART1 RX | Pulled up on some YD batches |
| GP16 | GP16 / MISO | SPI0 RX | I2C0 SDA, UART0 TX | Default SPI data in |
| GP17 | GP17 / CS | SPI0 CSn | I2C0 SCL, UART0 RX | Default SPI chip select |
| GP18 | GP18 / SCK | SPI0 SCK | I2C1 SDA | Default SPI clock |
| GP19 | GP19 / MOSI | SPI0 TX | I2C1 SCL | Default SPI data out |
| GP21 | GP21 / SCL1 | I2C1 SCL | UART1 RX | Secondary I2C clock |
| GP22 | GP22 / SDA1 | I2C1 SDA | UART1 TX | Secondary I2C data |
| GP23 | WS2812 / LED | Onboard RGB LED Data | None recommended | YD Specific: Drives WS2812B. Do not use for external sensors. |
| GP26 | ADC0 | Analog Input 0 | I2C1 SDA | 3.3V max input. 12-bit ADC. |
| GP27 | ADC1 | Analog Input 1 | I2C1 SCL | 3.3V max input. 12-bit ADC. |
| GP28 | ADC2 | Analog Input 2 | SPI1 SCK | 3.3V max input. 12-bit ADC. |
| GP29 | ADC3 / VSYS | Analog Input 3 | None | YD Specific: Tied to VSYS via voltage divider. Reads ~1/3 of USB voltage. |
Rows People Get Wrong: The 5V and ADC Traps
When reading the YD-RP2040 pinout, hobbyists frequently make three critical errors that result in bricked boards or erratic sensor readings. Here is how to avoid them.
The RP2040 silicon is strictly a 3.3V device. It is not 5V tolerant. Feeding a 5V signal into any GPIO (including the ADC pins) will forward-bias the internal ESD protection diodes. If the source can supply more than a few milliamps, the diode will overheat, shorting the pin to the 3.3V rail and permanently destroying the chip. Always use a logic level shifter or a simple resistor voltage divider when interfacing with 5V modules like standard HC-SR04 ultrasonic sensors.
The WS2812B LED Pin Mismatch: On the official Raspberry Pi Pico, the onboard user LED is a simple green diode tied to GPIO25. On the YD-RP2040 (specifically the widely available V2.2 revision), the onboard addressable WS2812B RGB LED is wired to GPIO23. If you copy-paste Pico blink code, your YD board will appear dead because GPIO25 is unconnected to any LED on this specific footprint.
The ADC3 / GPIO29 Voltage Divider: GPIO29 is internally routed to measure the board's VSYS (system voltage, typically 5V from USB). Because the RP2040 ADC cannot read above 3.3V, the YD-RP2040 routes VSYS through a resistor voltage divider (typically 200kΩ and 100kΩ) before it reaches GPIO29. When you read this pin via machine.ADC(29) in MicroPython, the raw value will represent roughly one-third of the actual system voltage. You must multiply your ADC reading by 3.0 in software to get the true USB VBUS voltage.
Silkscreen Symbols, Schematic Standards, and Board Variants
While NEC and IEC standards govern mains wiring color codes and physical safety, embedded schematic standards split between IEEE 315 (US-preferred, utilizing distinct geometric shapes for logic gates) and IEC 60617 (European/International, utilizing rectangular boxes for all logic functions). The official Raspberry Pi RP2040 Datasheet uses IEEE 315 symbols for its internal block diagrams and pin muxing matrices.
However, the YD-RP2040 silkscreen abandons formal schematic symbols entirely in favor of functional bus labels (e.g., SDA0, TX1). This makes the board easier to read for beginners but obscures the fact that these functions are multiplexed. You must understand that SDA0 on GP4 is not a dedicated hardware I2C pin; it is a GPIO configured via the RP2040's IO bank multiplexer.
Board Variant Differences (V1.1 vs V2.2):
The YD-RP2040 has undergone several manufacturing revisions. When interpreting your board's layout, identify your version:
- V1.1 (Older): Features a Micro-USB connector, no onboard RGB LED, and a smaller footprint. GPIO23 is a standard, unassigned breakout pin.
- V2.2 (Current Standard): Features a USB-C connector, an onboard WS2812B RGB LED on GPIO23, and a user button on GPIO24. The voltage regulator (LDO) is typically a 3.3V 500mA ME6211, which dictates the maximum current you can draw from the 3V3_OUT pin before triggering thermal shutdown.
Safe Interpretation When Silkscreen Markings Fade
Third-party clone boards like the YD-RP2040 frequently use low-quality silkscreen ink that rubs off after a few weeks of handling, or the boards arrive with misaligned printing that obscures the pin numbers. If you cannot read the YD-RP2040 pinout visually, you can safely map the critical power and ground pins using a digital multimeter (DMM) without risking a short circuit.
- Locate GND: Set your DMM to continuity mode (the diode/beep setting). Place the black probe on the metal outer shell of the USB-C connector. Probe the header pins with the red probe. Any pin that beeps (reads < 1 ohm) is a Ground pin. The USB-C shell is always hard-tied to the system ground plane.
- Locate VBUS (5V): Switch your DMM to DC Voltage. Plug the board into a standard 5V USB data charger (do not use a high-PD smart charger that might negotiate 9V/12V, as the YD-RP2040 LDO will overheat). Place the black probe on your confirmed GND pin. Probe the remaining pins. The pin reading exactly 4.8V to 5.2V is VBUS.
- Locate 3V3_OUT: With the board powered, keep the black probe on GND. Probe the remaining unmarked pins. The pin reading exactly 3.25V to 3.35V is the regulated 3V3 output. Note: Do not confuse this with the raw ADC pins, which may float or read erratic millivolt values if left unconnected.
By relying on electrical continuity and live voltage measurements rather than faded white ink, you ensure your sensor wiring is grounded correctly before you upload your firmware. For complete SDK configuration and peripheral routing details, always cross-reference your physical findings with the official Raspberry Pi RP2040 documentation.






