Skip to main content

CircuitPython Libraries Slither Into MicroPython on the Raspberry Pi Pico

Raspberry Pi
(Image credit: Tom's Hardware)

Adafruit has shared a new guide detailing the process for using CircuitPython libraries with MicroPython using our favorite microcontroller, the Raspberry Pi Pico.

The layer between CircuitPython and MicroPython is known as Blinka. It's a compatibility library designed to work with Linux SBCs like the Raspberry Pi Pico and the Raspberry Pi. However, the Raspberry Pi Pico microcontroller proved to be a unique challenge and hasn't been able to make use of this support until now.

Getting started is easy enough as Adafruit has supplied a full guide detailing everything you need to do. You will need the latest version of MicroPython. The instructions recommend using Thonny for this but when testing it ourselves, we opted to manually install MicroPython as Thonny had an out-of-date version listed. 

Once you've ensured your copy of MicroPython is truly the latest, you're free to go ahead and complete the guide steps which demonstrate how to use the libraries with a BME280 sensor. At this time not every library will work, we tested with a NeoPixel ring and found that it was not supported. Adafruit advised us that at the time of writing there is support for basic digital IO, I2C, SPI, UART but anything that needs a custom hardware API, including NeoPixels will not currently work. But this will change over time.

We're excited to see this new development bridge the gap between CircuitPython and MicroPython for the Pico which will hopefully save developers plenty of hassle going forward. Check out the full overview at the Adafruit website and guide to get an idea of how this new configuration works and start brainstorming your next microcontroller project.