This guide will show you how to use a Raspberry Pi Pico RP2040 to connect various sensors and breakouts to your PC running Windows, Mac OSX, or Linux. Special firmware gets loaded onto the Pico and turns it into a sort of Swiss army knife providing:

  • General Purpose digital Input and Output (GPIO) for things like buttons and LEDs
  • Analog to Digital Conversion (ADC) for reading analog signals
  • Pulse Width Modulation (PWM) for servos or LED dimming
  • I2C and SPI for connecting *lots* of external sensors, displays, etc.
  • NeoPixels (WS2812B) for happy rainbow blinky fun!

This is very similar to what the FT232H and MCP2221 already provide.

The u2if firmware is considered "experimental".

The Magical u2if Firmware

The key element to enabling this capability on the Raspberry Pi Pico is thanks to the excellent u2if firmware written by execuc. The main repo not only contains the firmware that goes on the Pico itself, but micropython compliant Python code for interfacing to the Pico from your PC. So if you're more used to the micropython interface, then checkout the u2if repo. It has everything you need.

In this guide, we use the exact same firmware on the Pico. But on the PC, we use the newly updated Blinka library which has added support for interfacing with a Pico running the u2if firmware.

CircuitPython Libraries on Personal Computers

This is essentially the same idea as discussed  in the FT232H Guide and the MCP2221 Guide. How can we directly connect common hardware items like buttons and LEDS (GPIO) or sensor breakouts (I2C/SPI) to a PC?

By loading the u2if firmware onto the Pico, it turns it into sort of a bridge using USB on the main PC. So you end up with something like this:

On the computer, we install Blinka which provides a CircuitPython compliant interface to the Pico with u2if. That way, all the CircuitPython libraries can then be used - on your PC!

Required Hardware

The main requirement is the Raspberry Pi Pico RP2040.

The Raspberry Pi foundation changed single-board computing when they released the Raspberry Pi computer, now they're...
Out of Stock

You'll need a USB cable for programming and interacting with the Pico - but you probably have one of these laying around. Just make sure it's not a charge only cable.

Beyond that, it all depends on what you want to do. There are examples provided later in this guide that show some typical use cases.

Other Hardware

If you're using STEMMA QT breakout boards, these cables can be helpful.

This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium Dupont male headers on the other. Compared with the...
In Stock
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium female headers on the other. Compared with the chunkier...
In Stock



Text editor powered by tinymce.