Raspberry Pi Pico and Pico W Pinout Guide: GPIOs Explained

This article goes into detail about the Raspberry Pi Pico and Pico W pinout. The Raspberry Pi Pico comes with 40 pins that can be used to connect electronic components like LEDs, motors, and sensors. Learn what each pin does, what it can be used for, and its specific functions.

Raspberry Pi Pico and Pico W Pinout Explained

Table of Contents

In this article, we’ll cover the following topics:

Introducing the Raspberry Pi Pico GPIOs

The Raspberry Pi Pico and Raspberry Pi Pico W have a row of 20 pins on each side, which makes a total of 40 pins. Of those 40 pins, 26 are programmable GPIOs that you can use to connect peripherals like LEDs, motors, and sensors, or even establish a communication with other microcontroller boards.

Raspberry Pi Pico W

The Raspberry Pi Pico GPIOs are labeled on the back. When you use the Raspberry Pi Pico on a breadboard, it might be difficult to identify each pin. So, it’s handy to always have a pinout diagram.

Raspberry Pi Pico Back Pi Labels

Raspberry Pi Pico W and Raspberry Pi Pico

Before explaining all about the Raspberry Pi Pico GPIOs, it’s important to notice that there are two different variants of the Raspberry Pi Pico board:

  • Raspberry Pi Pico: no wireless connectivity (no Wi-Fi, no Bluetooth)
  • Raspberry Pi Pico W: comes with wireless connectivity (Wi-Fi and Bluetooth)
Raspberry Pi Pico Family
Raspberry Pi Pico, Pico H, Pico W, Pico WH (Image source)

You may also see those versions referenced with an H, like Raspberry Pi Pico H, or Raspberry Pi Pico WH, which means they come with soldered header pins.

The pinout for the different variants is very similar, the only difference is the GPIO pin that controls the onboard LED and the location of the debug pins. We provide a different diagram for the Raspberry Pi Pico and for the Raspberry Pi Pico W.

Raspberry Pi Pico GPIO Interfaces

The Raspberry Pi Pico comes with 40 pins, 26 of which are programmable GPIOs that you can use to connect peripherals.

The Raspberry Pi Pico supports the following peripheral interfaces on its GPIOs:

The Raspberry Pi Pico GPIOs run at 3.3V.

Raspberry Pi Pico Pinout Diagram

The following picture shows the Raspberry Pi Pico pinout (which functions are supported by each pin).

Raspberry Pi Pico R3 A4 Board RP2040 Pinout Diagram GPIOs
Image source: raspberrypi.com

Raspberry Pi Pico W Pinout Diagram

The following picture shows the Raspberry Pi Pico W pinout (which functions are supported by each pin).

Raspberry Pi Pico W RP2040 Rev3 Board Pinout Diagram GPIOs
Image source: raspberrypi.com

Power Pins

The Raspberry Pi Pico has several power pins, 3V3 (OUT), VSYS, and VBUS marked as red on the pinout diagrams.

The 3V3(OUT) pin provides a 3.3V power output that can be useful to power external circuits.

The VBUS (USB Power Input) is the micro-USB input voltage. So, if you’re powering the Raspberry Pi Pico via the USB port using 5V, you’ll get 5V on the VBUS pin.

VSYS (External Power Input) is the main system input voltage. This means this pin allows for an external power supply to be connected to provide power to the board if you’re not using the micro-USB input. VSYS minimum input is 1.8V and maximum is 5.5V.

The GND pins are colored in black in the diagram.

There are other power pins for special cases:

  • 3V3_EN: connects to the board SMPS enable pin, which is the same as saying it is responsible for a hardware power on/off (hardware reset)—set to LOW to reset;
  • ADC_REF: ADC pin power supply voltage;
  • AGND: GND reference for the ADC pins;
  • RUN: this is the enable pin; set to LOW to reset the microcontroller chip RP2040 (software reset).

General Purpose Input/Output Pins

The Raspberry Pi Pico comes with 40 pins, 26 of which are programmable GPIOs (general-purpose input/output pins) that you can use to connect peripherals.

Raspberry Pi Pico GPIO pins

These pins are colored in a light green color on the diagrams. They are numbered from GPIO0 to GPIO29. Four of these pins are not exposed on the pin header but are dedicated to internal board functions: GPIO23, GPIO24, GPIO25, and GPIO29. See the following section.

GPIOs Dedicated to Internal Board Functions

There are GPIOs that are not exposed on the pin header, but that you can use to control or monitor internal board functions:

GPIO29internal ADC (ADC3) for measuring VSYS (check the analog pins section)
GPIO25Connected to the built-in onboard LED (on the Pico) (check this section)
GPIO24Indicator for VBUS presence
GPIO23Controls on-board SMPS (Switched Power Mode Supply)

PWM Pins

All Raspberry Pi Pico GPIOs can output PWM signals—they are marked in the diagrams in light green color.

The Raspberry Pi Pico has 8 independent PWM generators called slices. Each slice has two channels (A and B), which makes a total of 16 PWM channels.

GPIO0123456789101112131415
PWM Channel0A0B1A1B2A2B3A3B4A4B5A5B6A6B7A7B
GPIO1617181920212223242526272829
PWM Channel0A0B1A1B2A2B3A3B4A4B5A5B6A6B

The same PWM output can be selected on two GPIO pins; the same signal will appear on each GPIO.

Analog Pins

The Raspberry Pi Pico has a 12-bit ADC with four channels on a fixed set of pins (plus an extra internal temperature sensor). This means it can transform an analog signal into a digital signal as a number ranging from 0 to 4095.

It has five ADC channels, but only four are accessible on the GPIOs: GPIO26, GPIO27, GPIO28, and GPIO29.

The first three GPIOs (26, 27, and 28) can be used to read voltage from peripherals, while GPIO29 can be utilized to measure the voltage level of the VSYS supply on the Raspberry Pi Pico board (VSYS is the input voltage that powers the board).

The fifth ADC channel is connected to a built-in temperature sensor.

ADC ChannelGPIOFunction
ADC0GPIO26Read analog signals from peripherals
ADC1GPIO27Read analog signals from peripherals
ADC2GPIO28Read analog signals from peripherals
ADC3GPIO29Measure voltage level of VSYS power supply
ADC4———Read built-in temperature sensor

In summary, here are the key features of the analog pins of the Raspberry Pi Pico board:

  • 12-bit resolution – transforms an analog signal into a value between 0 and 4095;
  • 4 ADC channels on external GPIOs;
  • GPIOs 26, 27, and 28 can be used to read output voltage from peripherals;
  • GPIO29 can measure the input voltage that powers the board (VSYS);
  • There’s a fifth ADC channel that is connected to an internal temperature sensor.

I2C

There are two I2C peripherals available, named I2C1 and I2C0. You can use two different buses (I2C1 and I2C2) simultaneously, but you can’t use two I2C1 or two I2C2 at the same time. You can use I2C communication on any of the I2C pins available.

The default I2C pins are GPIO 4 (SDA) and GPIO 5 (SCL).

The following table shows all the pins you can use for I2C communication.

I2C ControllerSDA GPIOsSCL GPIOs
I2C0GPIO0, GPIO4, GPIO8, GPIO12, GPIO16, GPIO20GPIO1, GPIO5, GPIO9, GPIO13, GPIO17, GPIO21
I2C1GPIO2, GPIO6, GPIO10, GPIO14, GPIO18, GPIO26GPIO3, GPIO7, GPIO11, GPIO15, GPIO19, GPIO27

SPI

There are also two SPI peripherals available, SPI0 and SPI1. You can use two SPI buses on different peripherals simultaneously, but you cannot use two buses on the same peripheral at the same time. You can use SPI on any of the available SPI pins, but the default are GPIO19 (TX), GPIO18 (SCK), GPIO17 (CS), and GPIO 16 (RX).

Raspberry Pi Pico Default SPI Pins: GPIO19 (TX), GPIO18 (SCK), GPIO17 (CS) and GPIO 16 (RX)

The following table shows all the pins you can use for SPI communication:

SPI ControllerRX GPIOsTX GPIOsCLK GPIOsCS GPIOs
SPI0GPIO0, GPIO4, GPIO16GPIO3, GPIO7, GPIO19GPIO2, GPIO6, GPIO18GPIO1, GPIO5, GPIO17
SPI1GPIO8, GPIO12GPIO11, GPIO15GPIO10, GPIO14GPIO9, GPIO13

UART

Similarly to I2C and SPI, there are two UART peripherals: UART0 and UART1. You can use UART in any of the available pins, but GPIO0(TX) and GPIO1(RX) are the default UART pins.

Raspberry Pi Pico Default UART Pins: GPIO0(TX) and GPIO1(RX)

The following table shows all the pins you can use for UART:

UART InterfaceTX GPIOsRX GPIOs
UART0GPIO0, GPIO12, GPIO16GPIO1, GPIO13, GPIO17
UART1GPIO4, GPIO8GPIO5, GPIO9

Built-in LED

Raspberry Pi Pico W onboard LED on

The Raspberry Pi Pico comes with a built-in onboard LED that is useful for testing and debugging purposes (see the green LED in the picture above). You can control the built-in LED via GPIO25 (Raspberry Pi Pico).

  • Raspberry Pi Pico: built-in LED connected to GPIO 25

On the Raspberry Pi Pico W, usually you refer to it as ‘LED’ in MicroPython or LED_BUILTIN in Arduino IDE.

Onboard Temperature Sensor

As we’ve mentioned previously, the Raspberry Pi Pico comes with a built-in temperature sensor that you can read on ADC4.

Debugging Pins

The Raspberry Pi Pico comes with debug pins that you can use to connect to a Raspberry Pi Debug Probe for troubleshooting and debugging.

Raspberry Pi Pico Debug pins

The pins are located in different places on the Pico and Pico W but act similarly. These pins are labeled as SWDIO (Serial Wire Debug I/O), GND, and SWCL (Serial Wire Debug Clock) at the back of the board.

Wrapping Up

We hope you’ve found this guide for the Raspberry Pi Pico and Pico W GPIOs useful. For more detailed information about the Raspberry Pi Pico GPIOs, consult the datasheet: Raspberry Pi Pico datasheet.

If you’re just getting started with the Raspberry Pi, take a look at our tutorials:

You can check all our Raspberry Pi Pico tutorials on the following link:

Thanks for reading.



Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »

Recommended Resources

Build a Home Automation System from Scratch » With Raspberry Pi, ESP8266, Arduino, and Node-RED.

Home Automation using ESP8266 eBook and video course » Build IoT and home automation projects.

Arduino Step-by-Step Projects » Build 25 Arduino projects with our course, even with no prior experience!

What to Read Next…


Enjoyed this project? Stay updated by subscribing our newsletter!

12 thoughts on “Raspberry Pi Pico and Pico W Pinout Guide: GPIOs Explained”

  1. Do you have any examples of pico debug using the JLINK devices and the Eclipse environment? JTAG level debug nt using another Pico.

    I want to program both cores to do concurrent work and share peripherals.

    If so please contact me with details.
    Sincerely,

    Mike Fontes

    Reply
      • Sara,
        Do you know of any developers using the Eclipse IDE with the Pico who I can contact? I have used it with the TI code composer environment and the TI single core devices but want to develop some code for stepper motor control that uses a round robin OS I developed over the years.

        Reply
  2. Hi,

    There is an error in the UART table. RX GPIO should be GPIO13 not GPIO3.

    UART0 GPIO0, GPIO12, GPIO16 GPIO1, GPIO3, GPIO17 <====== Original

    UART0 GPIO0, GPIO12, GPIO16 GPIO1, GPIO13, GPIO17 <====== fixed GPIO

    Reply
  3. Hi Sara,
    here a comment on the built-in LEDs:
    The command => Serial.print(LED_BUILTIN); <= corectly reproduces the GPIO25 for the Pico-board, but in my case shows the GPIO32 for the PicoW-board. GPIO0 would conflict with UART0 anyway.
    By the way, UART0 (TX => GPIO0, RX => GPIO1) is only accessed through “Serial1”. The simple “Serial” represents the connection to the USB connector.
    Best regards.

    Reply
  4. Hello Sarah,
    I am looking at this board as I am fed up with restrictions on use of IO pins and PWM frequencies on arduino nano, 8266 and esp32.

    No mention of 5v tolerance, what is maximum digital input voltage?

    Is the PWM frequency adjustable?

    Thanks.
    Terry R.

    Reply
  5. Hi,
    thank you for nice tutorial.

    Do you think that it would be possible to use same libraries as for Arduino UNO.
    For example if I would like to have it connected with ETHERNET SHIELD W5100, AUDIO SHIELD VS 1053 B (and create simple internet radio)

    Best Regards,
    Milan

    Reply

Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.