Use Adafruit’s CircuitPython on the Raspberry Pi Pico

At the start of the Raspberry Pi Pico launch, it was only possible to program it in either C/C++ or MicroPython. A few languages are beginning to make an appearance now, including the quite exciting prospect of Rust running on the board. Today, I’m highlighting Adafruit’s CircuitPython. It is similar, though not identical, to MicroPython but seems to have many more libraries available. The folks over at Adafruit have taken the examples from the Getting Started with MicroPython book and adapted them to CircuitPython. They have then put together a great, comprehensive Getting Started with Raspberry Pi Pico and CircuitPython guide, including how to install it and how to use the available resources on the Pico.

This is a great move by Adafruit – i.e. getting the language working on the Pico – and in some ways it’s much easier to use CircuitPython than MicroPython due to the way you upload your code. It’s certainly easier than the somewhat “uneven” experience of working with C/C++ in various environments, most notably Windows.

Of course, you might prefer to stick with MicroPython, it being Raspberry Pi’s preferred language, but CircuitPython gives you a slightly bigger world in which to work. There are still advantages to MicroPython, as Adafruit themselves point out:

  1. Advanced APIs such as interrupts and threading.
  2. Complete PIO API (CircuitPython’s support is incomplete)
  3. Using existing MicroPython code

Romilly Cocking has pointed out, in the comments, the following:

CircuitPython is a fork of MicroPython. Damien George (creator of MicroPython) is comfortable with it. He regards the two versions like Linux Distros: the same core code packaged differently for different audiences.

Another great advantage of CircuitPython is that you can use Adafruit Blinka which lets you run a huge range of CircuitPython libraries on the Raspberry Pi or Jetson Nano.

It’s entirely up to you – give it a go, see what you can make!

5 comments for “Use Adafruit’s CircuitPython on the Raspberry Pi Pico

  1. CircuitPython is a fork of MicroPython. Damien George (creator of MicroPython) is comfortable with it. He regards the two versions like Linux Distros: the same core code packaged differently for different audiences.

    Another great advantage of CircuitPython is that you can use Adafruit Blinka which lets you run a huge range of CircuitPython libraries on the Raspberry Pi or Jetson Nano.

  2. At the moment if you want to build a project with sensors in a reasonable time on a Pico you need to use CircuitPython. Finding suitable I2C and SPI libraries for Micropython, which work for many common items such as temperature/humidity sensors (BME280) and displays (except SSD1306 and those built into the Pimoroni add-ons), is currently a nightmare.
    What we quickly need is a Raspberry Pi Pico web site listing tested Pico MicroPython libraries, with short demo examples and links for downloading. I think the RPi foundation need to quickly get started on this and appoint a suitable librarian.
    The sh1106 suggested driver in the MicroPython SDK appendix does not work properly – it overflows off the right side of the display onto the left.
    I agree that MicroPython is currently very poor at library management when compared to CircuitPython.
    Give CP a try as it is very easy to switch your Pico between the two and back again. The Adafruit learning guides are fantastic and their massive library of drivers work!

  3. Hey Micheal, thanks for the post very informative. I’ve found that adafruit has some great resources, especially given they link these resources right on the page for the product you’re buying so you’re never lost when it finally comes in the mail. Currently experimenting with motor driver boards that require circuitpython and I’m adamant to continue using the raspberry pi pico for this – I hope python will work out for me so I can teach this as a robotics after school resource.

    One of the things I’ve noticed between MicroPython and Circuit Python is that Micropython on the Raspberry Pi has more support via the Thonny IDE, which the MicroPython book recommends you to use with it’s examples. What I’m curious is with the transition between micropython and the generic circuitpython interpreter that Thonny has, is there a development environment more friendly with circuit python? Or is this support that we’ll see later on down the road as it’s more widely adopted on the pico? Curious to hear what you think – thanks in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.