Now that you have a Pico you're probably wondering why most Adafruit tutorials are for CircuitPython when the official Python is called MicroPython?

Whats the difference, why use one or the other?

CircuitPython is a 'fork' based on MicroPython

CircuitPython code is gonna look a lot like MicroPython because they're based on the same Python implementation. There are some minor differences because CircuitPython is focused on beginners, education, and getting folks started super fast. If you already know MicroPython, 95% of what you know will work just the same!

CircuitPython is also available for the Pico and generally RP2040 boards. You load it just like loading MicroPython.

While CircuitPython is based on MicroPython, there are some key differences why you may want to use CircuitPython instead of MicroPython.

So what's different?

There's a few differences and they're all documented here, however for Pico users who have tried or are following  MicroPython guides the most important are...

CircuitPython was designed to have a USB disk drive that appears when you plug in the board. That disk drive is small (on the order of MB!) and holds your code and files. You can treat it just like a disk drive - drag and drop files, delete and copy them. You do not need to use Thonny to 'upload' a file - simply drag any file you want to the USB drive.

CircuitPython will restart your code when you save files to the disk drive. That means when you write Python code, whenever you save it will auto-reload the code for you, for instant gratification. This is a little unusual for programmers who are used to 'edit-save-compile-upload-reset-run' - we go straight to 'edit-save-run'.

CircuitPython has a consistent API across all boards. That means that whether you're using a Pico, or an nRF52840 or an ESP32-S2 or SAMD51 for your project, the code for your hardware is identical. (Other than pin names which may vary depending on how many there are on the board itself and what they're called).

CircuitPython has a lot of examples and support!
There are 260+ libraries for the standard CircuitPython API. Most of these will already work. Listed here

Tons of guides and tutorials at https://learn.adafruit.com/category/circuitpython

Most CircuitPython libraries also work on Raspberry Pis via the Blinka library. That means you can write code that works on both!

Why Use MicroPython?

You may want to use MicroPython for:
1) Advanced APIs such as interrupts and threading.
2) Complete PIO API (CircuitPython's support is incomplete)
3) Using existing MicroPython code

It's great to know both!


To get started quick:

Download CircuitPython for the Pico from circuitpython.org: https://circuitpython.org/board/raspberry_pi_pico/

For now, click "Absolute Newest", then click your language code such as "en_US", and finally download the UF2 file at the top. That will be the latest and greatest version of CircuitPython. As support matures, the download page will stable releases. You can also choose a beta release but many features and fixes are being added on a daily basis, so "Absolute Newest" will be the best for a while.

After dragging the CircuitPython UF2 to RPI-RP2 bootloader the chip will reset and show a CIRCUITPY drive.

See the Welcome to CircuitPython and CircuitPython Essentials guides for CircuitPython basics. API Docs are here though they won't include RP2040 specific modules until support is merged in. A Pico specific guide that will grow in time is here.

Join the Adafruit Discord for #help-with-circuitpython and feel free to mention @tannewt for RP2040 specific questions.

This guide was first published on Jan 21, 2021. It was last updated on 2021-02-17 16:17:15 -0500.

This page (MicroPython or CircuitPython?) was last updated on Feb 20, 2021.

Text editor powered by tinymce.