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 PinSilkscreen LabelPrimary FunctionAlternate Mux (I2C/SPI/UART)YD-RP2040 Specific Notes
GP0GP0 / TX0Digital I/O / UART0 TXI2C0 SDA, SPI0 RXStandard 3.3V logic
GP1GP1 / RX0Digital I/O / UART0 RXI2C0 SCL, SPI0 CSnStandard 3.3V logic
GP2GP2Digital I/OI2C1 SDA, SPI0 SCKStandard 3.3V logic
GP3GP3Digital I/OI2C1 SCL, SPI0 TXStandard 3.3V logic
GP4GP4 / SDA0I2C0 SDASPI0 RX, UART1 TXPulled up on some YD batches
GP5GP5 / SCL0I2C0 SCLSPI0 CSn, UART1 RXPulled up on some YD batches
GP16GP16 / MISOSPI0 RXI2C0 SDA, UART0 TXDefault SPI data in
GP17GP17 / CSSPI0 CSnI2C0 SCL, UART0 RXDefault SPI chip select
GP18GP18 / SCKSPI0 SCKI2C1 SDADefault SPI clock
GP19GP19 / MOSISPI0 TXI2C1 SCLDefault SPI data out
GP21GP21 / SCL1I2C1 SCLUART1 RXSecondary I2C clock
GP22GP22 / SDA1I2C1 SDAUART1 TXSecondary I2C data
GP23WS2812 / LEDOnboard RGB LED DataNone recommendedYD Specific: Drives WS2812B. Do not use for external sensors.
GP26ADC0Analog Input 0I2C1 SDA3.3V max input. 12-bit ADC.
GP27ADC1Analog Input 1I2C1 SCL3.3V max input. 12-bit ADC.
GP28ADC2Analog Input 2SPI1 SCK3.3V max input. 12-bit ADC.
GP29ADC3 / VSYSAnalog Input 3NoneYD 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.

Warning: The 5V Tolerance Myth
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.

  1. 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.
  2. 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.
  3. 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.