Raspberry Pi Pico

Raspberry Pi Pico Board

Raspberry Pi Pico
The new flexible microcontroller board from Raspberry Pi.

Welcome to your Raspberry Pi Pico

Welcome to your Raspberry Pi Pico, a microcontroller board built on silicon designed here at Raspberry Pi.

Whether you choose to use our C/C++ SDK, or the official MicroPython port, everything you need to get started is here. You’ll also find links to the technical documentation for both the Raspberry Pi Pico microcontroller board and our RP2040 microcontroller chip.

Board Specifications

Raspberry Pi Pico is a low-cost, high-performance microcontroller board with flexible digital interfaces. Key features include:

  • RP2040 microcontroller chip designed by Raspberry Pi in the United Kingdom
  • Dual-core Arm Cortex M0+ processor, flexible clock running up to 133 MHz
  • 264KB of SRAM, and 2MB of on-board Flash memory
  • Castellated module allows soldering direct to carrier boards
  • USB 1.1 with device and host support
  • Low-power sleep and dormant modes
  • Drag-and-drop programming using mass storage over USB
  • 26 × multi-function GPIO pins
  • 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable PWM channels
  • Accurate clock and timer on-chip
  • Temperature sensor
  • Accelerated floating-point libraries on-chip
  • 8 × Programmable I/O (PIO) state machines for custom peripheral support

Documentation

Documentation for the Raspberry Pi Pico board and the RP2040 microcontroller:

The API level Doxygen documentation for the Raspberry Pi Pico C/C++ SDK is available as a micro-site.

Utilities

What is on your Pico?

If you have forgotten what has been programmed into your Raspberry Pi Pico, and the program was built using our Pico C/C++ SDK, it will usually have a name and other useful information embedded into the binary. You can use the Picotool command line utility to find out these details. Full instructions on how to use Picotool to do this are available in our 'getting started' documentation.

Picotool repo

Debugging using another Raspberry Pi Pico

It is possible to use one Raspberry Pi Pico to debug another Pico. This is possible via picoprobe, an application that allows a Pico to act as a USB → SWD and UART converter. This makes it easy to use a Pico on non-Raspberry Pi platforms such as Windows, Mac, and Linux computers where you don’t have GPIOs to connect directly to your Pico. Full instructions on how to use Picoprobe to do this are available in our 'getting started' documentation.

Download UF2 filePicoprobe repo

Resetting Flash memory

Pico's BOOTSEL mode lives in read-only memory inside the RP2040 chip, and can't be overwritten accidentally. No matter what, if you hold down the BOOTSEL button when you plug in your Pico, it will appear as a drive onto which you can drag a new UF2 file. There is no way to brick the board through software. However, there are some circumstances where you might want to make sure your Flash memory is empty. You can do this by dragging and dropping a special UF2 binary onto your Pico when it is in mass storage mode.

Download UF2 fileSee the code

Getting started with MicroPython

Drag and drop MicroPython

You can program your Pico by connecting it to a computer via USB, then dragging and dropping a file onto it, so we’ve put together a downloadable UF2 file to let you install MicroPython more easily.

  1. Download the MicroPython UF2 file by clicking the button below.
  2. Push and hold the BOOTSEL button and plug your Pico into the USB port of your Raspberry Pi or other computer. Release the BOOTSEL button after your Pico is connected.
  3. It will mount as a Mass Storage Device called RPI-RP2.
  4. Drag and drop the MicroPython UF2 file onto the RPI-RP2 volume. Your Pico will reboot. You are now running MicroPython.

You can access the REPL via USB Serial. Our MicroPython documentation contains step-by-step instructions for connecting to your Pico and programming it in MicroPython.

Download UF2 file

MicroPython animation

What is MicroPython?

MicroPython is a full implementation of the Python 3 programming language that runs directly on embedded hardware like Raspberry Pi Pico. You get an interactive prompt (the REPL) to execute commands immediately via USB Serial, and a built-in filesystem. The Pico port of MicroPython includes modules for accessing low-level chip-specific hardware.

Go to WikiGo to Forum

MicroPython logo

Your official guide

If you’re new to MicroPython, our official guide, "Get started with MicroPython on Raspberry Pi Pico", is a great place to start. Learn the basics of MicroPython and physical computing, connect your Pico to displays and sensors, build alarms, reaction games, and more.

Buy now

Get started with MicroPython on Raspberry Pi Pico illustration

Documentation

Documentation for the Raspberry Pi Pico board and the RP2040 microcontroller:

The API level Doxygen documentation for the Raspberry Pi Pico C/C++ SDK is available as a micro-site.

Getting started with C/C++

Blink an LED

The first program anyone writes when using a new microcontroller is to blink an LED on and off. The Raspberry Pi Pico comes with a single LED on-board (connected to GPIO pin 25). You can blink this on and off by,

  1. Download the Blink UF2
  2. Push and hold the BOOTSEL button and plug your Pico into the USB port of your Raspberry Pi or other computer.
  3. It will mount as a Mass Storage Device called RPI-RP2.
  4. Drag and drop the Blink UF2 binary onto the RPI-RP2 volume.
  5. Pico will reboot, and the on-board LED should start blinking.

Download UF2 fileSee the code

Blink an LED animation

Say 'Hello World'

The next program anyone writes is to say 'Hello World' over a USB serial connection.

  1. Download the 'Hello World' UF2.
  2. Push and hold the BOOTSEL button and plug your Pico into the USB port of your Raspberry Pi or other computer.
  3. It will mount as a Mass Storage Device called RPI-RP2.
  4. Drag and drop the 'Hello World' UF2 binary onto the RPI-RP2 volume. Pico will reboot
  5. Open a Terminal window and type:
sudo apt install minicom
minicom -b 115200 -o -D /dev/ttyACM0

You should see 'Hello, world!' printed to the Terminal

Download UF2 fileSee the code

Hello World animation

Raspberry Pi Pico C/C++ SDK

Our official C SDK can be used from the command line, or from popular integrated development environments like Visual Studio Code, Eclipse, and CLion. To get started, download our C/C++ SDK and Examples, and take a look at our 'getting started' documentation to get going. Or for a quick setup see the next section.

SDK RepoExamples Repo

Pico C SDK illustration

SDK Setup

For a full walk-through of how to get going with the C/C++ SDK, you should read our 'getting started' documentation. However, if you are intending to develop for Pico on a Raspberry Pi, then you can set up the C/C++ toolchain quickly by running our setup script from the command line.

Note: You should make sure the OS on your Raspberry Pi is up to date before running the setup script.

Download Setup Script

SDK setup illustration

Documentation

Documentation for the Raspberry Pi Pico board and the RP2040 microcontroller:

The API level Doxygen documentation for the Raspberry Pi Pico C/C++ SDK is available as a micro-site.

Get inspired

Looking for project inspiration?

We'll be posting great Raspberry Pi Pico projects from around the world.

Windows Setup Script

For anyone that might have had problems manually installing the development toolchain under Windows 10, then Nikhil Dabas has your back with a new easy-to-use installer to get started on Windows for the C/C++ SDK. The script was inspired by, and is roughly equivalent to, our own pico-setup script for the Raspberry Pi.

A Pico probe enclosure

It is possible to use one Raspberry Pi Pico to debug another Raspberry Pi Pico. This is possible via picoprobe, an application that allows a Raspberry Pi Pico to act as a USB → SWD and UART converter. But maybe you want your Pico probe to look like a proper debugger? Well now you can thanks to Brian Welsby.

PicoStation 3D

An unfinsihed, and untested, project from Luke Wren, to develop a 3D games console based on an RP2040 and an iCE40 UP5k FPGA. While the first iteration of the board now has a soldered prototype, Luke hasn't had a change to bring up the board or write firmware yet. So stay tuned.

Pico Breakout

A Breakout game for Raspberry Pi Pico using the Pimoroni Pico Display pack. Sitting on top of the pimoroni-pico display library the game code itself is surprisingly small and a really nice example of how to get the best out of the Display.

A function generator

A rough sine wave is output using the fast PIO-based PWM and then passed though a very simple low-pass filter to create a smooth analogue output. The filter consists of a resistor and capacitor crude but effective!

Pico StreamDeck

Still a work in progress, but a nice of example of using Pico as a HID device. Pete Gallagher is using his Pico and CircuitPython to to create an OBS StreamDeck. A 3D printed enclosure, and keycaps, are coming soon.

Silicon teardown time

A Twitter thread from John McMaster the well know silicon reverse engineer. With X-ray images of Raspberry Pi Pico, and internal imagery of RP2040 itself.

A very tiny game of Tetris®

What better use of a Raspberry Pi Pico and the Pico Display Pack from Pimoroni than to play the tiniest game of Tetris you've ever seen? The code is available so you too can play the game.

Pico and LoRaWAN

Looks to be pretty easy to use Pico with the RAK4200 Wisduo LoRaWAN module from MicroPython. Only 4 connections are needed; 3.3v, GND, TX, and RX. Better yet, it all fits on a half-sized breadboard.

BBC Micro Emulator

Raspberry Pi Pico-powered BBC Micro and BBC Master emulation. Graham Sanderson‘s little bit of fun with our latest creation emulates the fine detail of the hardware required to get the best games and graphics demos to run.

Pico C++ Boilerplate Project

Take away all the dull bits of setting up your open source project. Just hit "Use this template" and start coding! Once you've got something ready to share, tag a "Release" and a compiled UF2 will be attached automatically for people to try out.

RP2040 port of CircuitPython

CircuitPython 6.2 brings the examples and libraries of CircuitPython to the RP2040. After installing via UF2, a CIRCUITPY drive appears with code.py. Edit it with your favorite text editor to start coding. The code will re-run after the file is saved.

Pico WS2812b

A library for WS2812b (NeoPixel) LEDs. This convenience library makes using NeoPixel strings much easier from MicroPython. Providess two methods; one to set the colour value of an particular LED, the other to send data up to the strip.

NeoPixel dithering with Pico

A dithering WS2812b (NeoPixel) controller. One core handles the calculations for the dithering, the other core is free to create whatever animations you like. The pixels are pushed out with PIO. The virtual bit depth is configurable.

Neopixel LED strip

Pico Tracker 🎈

A port of Dave Akerman's High Altitude Balloon (HAB) tracker, enhanced with pressure and temperature sensors. The RP2040 port also includes a landing prediction algorithms, so he knows where his balloon will (might!) land before he flies.

Pico Tracker

Bitbanged DVI on RP2040

Wouldn't it be absurd and wonderful to connect a microcontroller straight to an HD TV, with no other electronics in between? RP2040 has no video hardware, but enough processing performance and IO flexibility to drive DVI straight out of the GPIOs if you're careful. 1x microcontroller, 8x 270 ohm resistors, 1x HDMI cable, 1x TV.

PicoDVI board outputting an image to a display

Hub 75 Panel

Hub75 LED panels are an affordable way of adding lots of colourful lights to a build. This project shows you how to control a 32x32 RGB LED panel using MicroPython. Raspberry Pi Pico’s PIO lets you output data fast enough for smooth animations.

Pico PIO Buzz

A simple PIO program that outputs a tone based on a number going into it. I've not yet done the maths to work out what number means what note, but it seems to give a nice range over audible tones. A bit buzzy at lower frequencies, but sounds nicer higher up.