This repo contains CircuitPython example code for Pimoroni RP2040 boards and our Pico Bases and Packs: https://shop.pimoroni.com/collections/pico
- Download a version of CircuitPython for your board at https://circuitpython.org/downloads
- Hold down the BOOT button whilst plugging in the USB cable or pressing RESET to go into DFU mode - your board will show up as a drive on your computer called
RPI-RP2
. - Drag the newly downloaded CircuitPython .uf2 to the
RPI-RP2
drive - it will then reboot running CircuitPython (and will show up as a drive calledCIRCUITPY
). - Edit
code.py
on the CIRCUITPY drive with any text editor - when saved your code will run automatically. If you need access to the serial console (useful for viewing errors and troubleshooting your code), consider downloading Mu - https://codewith.mu/
Some code in this repo uses additional CircuitPython libraries. You can find these in the CircuitPython library bundle at https://circuitpython.org/libraries - make sure to download the bundle that matches your version of CircuitPython! Once you've located the relevant file or directory, copy it into the lib
folder on CIRCUITPY
.
With the serial console open in Mu, press Ctrl-C to enter the REPL.
To view the available pins for your board (very handy), enter the following:
import board
dir(board)
Hit Ctrl-D when you're done to reload code.py
.
Want to know more about CircuitPython? Start here: https://learn.adafruit.com/welcome-to-circuitpython