Raspberry Pi's RP2040 board: 26 usable GPIO on two rows of 20 pins, three of them ADC inputs. Almost every pin offers an I2C, SPI, UART and PWM function; pick one per pin in code. The pins marked default are the defaults in Raspberry Pi's official pinout.
Top view, USB at the top. Pin 1 is top left; the numbers run down the left side and back up the right.
| Position | Pin | In code | Functions | Notes |
|---|---|---|---|---|
| Pin 1 | GP0 | I2C0 SDA, SPI0 RX, UART0 TX, PWM0 A | ||
| Pin 2 | GP1 | I2C0 SCL, SPI0 CSn, UART0 RX, PWM0 B | ||
| Pin 3 | – | – | ||
| Pin 4 | GP2 | I2C1 SDA, SPI0 SCK, UART0 CTS, PWM1 A | ||
| Pin 5 | GP3 | I2C1 SCL, SPI0 TX, UART0 RTS, PWM1 B | ||
| Pin 6 | GP4 | I2C0 SDA, SPI0 RX, UART1 TX, PWM2 A | ||
| Pin 7 | GP5 | I2C0 SCL, SPI0 CSn, UART1 RX, PWM2 B | ||
| Pin 8 | – | – | ||
| Pin 9 | GP6 | I2C1 SDA, SPI0 SCK, UART1 CTS, PWM3 A | ||
| Pin 10 | GP7 | I2C1 SCL, SPI0 TX, UART1 RTS, PWM3 B | ||
| Pin 11 | GP8 | I2C0 SDA, SPI1 RX, UART1 TX, PWM4 A | ||
| Pin 12 | GP9 | I2C0 SCL, SPI1 CSn, UART1 RX, PWM4 B | ||
| Pin 13 | – | – | ||
| Pin 14 | GP10 | I2C1 SDA, SPI1 SCK, UART1 CTS, PWM5 A | ||
| Pin 15 | GP11 | I2C1 SCL, SPI1 TX, UART1 RTS, PWM5 B | ||
| Pin 16 | GP12 | I2C0 SDA, SPI1 RX, UART0 TX, PWM6 A | ||
| Pin 17 | GP13 | I2C0 SCL, SPI1 CSn, UART0 RX, PWM6 B | ||
| Pin 18 | – | – | ||
| Pin 19 | GP14 | I2C1 SDA, SPI1 SCK, UART0 CTS, PWM7 A | ||
| Pin 20 | GP15 | I2C1 SCL, SPI1 TX, UART0 RTS, PWM7 B | ||
| Pin 21 | GP16 | I2C0 SDA, SPI0 RX, UART0 TX, PWM0 A | ||
| Pin 22 | GP17 | I2C0 SCL, SPI0 CSn, UART0 RX, PWM0 B | ||
| Pin 23 | – | – | ||
| Pin 24 | GP18 | I2C1 SDA, SPI0 SCK, UART0 CTS, PWM1 A | ||
| Pin 25 | GP19 | I2C1 SCL, SPI0 TX, UART0 RTS, PWM1 B | ||
| Pin 26 | GP20 | I2C0 SDA, SPI0 RX, UART1 TX, PWM2 ACLOCK GPIN0 | ||
| Pin 27 | GP21 | I2C0 SCL, SPI0 CSn, UART1 RX, PWM2 BCLOCK GPOUT0 | ||
| Pin 28 | – | – | ||
| Pin 29 | GP22 | I2C1 SDA, SPI0 SCK, UART1 CTS, PWM3 ACLOCK GPIN1 | ||
| Pin 30 | – | – | RP2040 enable with an on-chip pull-up of about 50 kΩ. Short it to ground to reset the Pico; a button from RUN to GND makes a reset button. | |
| Pin 31 | GP26 | ADC0, I2C1 SDA, SPI1 SCK, UART1 CTS, PWM5 A | ADC pins have a diode to the 3.3 V rail: keep the input below 3.3 V + about 0.3 V, and don't drive them while the Pico is unpowered or the signal leaks into its supply. | |
| Pin 32 | GP27 | ADC1, I2C1 SCL, SPI1 TX, UART1 RTS, PWM5 B | ADC pins have a diode to the 3.3 V rail: keep the input below 3.3 V + about 0.3 V, and don't drive them while the Pico is unpowered or the signal leaks into its supply. | |
| Pin 33 | – | – | Analog ground for GP26 to GP29, with its own ground plane under the ADC traces. Use it as the ground for analog sensors, or treat it as a normal GND if the ADC doesn't matter. | |
| Pin 34 | GP28 | ADC2, I2C0 SDA, SPI1 RX, UART0 TX, PWM6 A | ADC pins have a diode to the 3.3 V rail: keep the input below 3.3 V + about 0.3 V, and don't drive them while the Pico is unpowered or the signal leaks into its supply. | |
| Pin 35 | – | – | The ADC's supply and reference, a filtered copy of 3.3 V. Connect an external reference here (for example a 3.0 V shunt reference) for better ADC accuracy. | |
| Pin 36 | – | – | The 3.3 V rail that powers the RP2040 and its I/O. You can power other parts from it; keep the load under 300 mA. | |
| Pin 37 | – | – | Enable for the 3.3 V regulator, pulled up to VSYS with 100 kΩ. Short it to ground to switch off the 3.3 V rail, which also powers down the RP2040. | |
| Pin 38 | – | – | ||
| Pin 39 | – | – | Main system input, 1.8 to 5.5 V, into the on-board buck-boost regulator. Power the Pico here from a battery or another supply; on USB it is VBUS minus the diode drop. | |
| Pin 40 | – | – | The Micro-USB 5 V input (5 V ± 10%), 0 V when no USB is connected. It feeds VSYS through a Schottky diode. | |
| Debug | – | – | Serial Wire Debug clock, for a debug probe such as the Raspberry Pi Debug Probe. | |
| Debug | – | – | ||
| Debug | – | – | Serial Wire Debug data, for a debug probe such as the Raspberry Pi Debug Probe. |
Every board is drawn from the top, the way you see it on the bench, with the pins in their real order. Red pins are power, black are ground, grey are control pins such as reset, and green are general-purpose I/O. A yellow ring marks a pin with a catch: a strapping pin that changes how the chip boots, a pin wired to flash or USB, or an input-only pin.
Pick a function above the drawing (I2C, SPI, ADC…) to light up the pins that can do it and see each pin's name for that function. Pins marked default are the ones the board's own documentation uses; on the ESP32 and the Pico most peripherals can move to other pins in software.
The label printed on the board, the physical pin number and the number you type in code are often three different things. On a Raspberry Pi, physical pin 11 is GPIO17. On an ESP32 the board says IO32 and the code says 32. The table under each drawing lists all three.
| Board | Logic level | 5 V on a GPIO? | Current per pin | All pins together |
|---|---|---|---|---|
| ESP32-DevKitC | 3.3 V | No (3.6 V max) | ~20 mA default, ~40 mA max drive | 1,200 mA (abs. max) |
| Arduino Uno R3, Nano | 5 V | Yes | 20 mA (40 mA abs. max) | 200 mA (abs. max) |
| Raspberry Pi Pico | 3.3 V | No | 2–12 mA, 4 mA default | 50 mA |
| Raspberry Pi (40-pin header) | 3.3 V | No | 16 mA | 50 mA |
The ESP32, the Pico and the Raspberry Pi run their pins at 3.3 V and none of them is 5 V tolerant. A 5 V sensor output on one of their GPIOs needs a level shifter or a resistor divider. The Arduino Uno and Nano run at 5 V; most 3.3 V modules need their inputs shifted down when you connect them to an Arduino.
The current limits are for the I/O pins, not for driving motors or relays. A small indicator LED is fine on any of these boards with a series resistor that keeps it under the pin's limit; anything bigger goes through a transistor or a driver. The LED resistor calculator works out the resistor.
GrandpaCAD's chat picks real parts, draws the schematic, routes the PCB and checks it against JLCPCB's rules. You get Gerbers, BOM, pick-and-place, a KiCad project and a 3D board, plus a printed case if you want one.
"Raspberry Pi Pico carrier board with 8 buttons and a buzzer"