../_images/CircuitPython-logo.png

CircuitPython Microcontroller Programming

We use a variety of microcontrollers which use CircuitPython as their operating system and programming language. There are hundreds of different boards available which use CircuitPython. The following sections provide a general usage guide and details for the specific microcontrollers we may use in this course.

The CircuitPython language is compatible across these devices, but individual code samples involving hardware input or output are typically written for a specific platform. However, the samples can generally be ported to a different device with modest changes.

To get started, please read the CircuitPython Introduction, followed by the introductory page for the specific device you will be using.

General CircuitPython Guide

Raspberry Pi Pico

../_images/Pico-thumb.jpg

The Raspberry Pi Pico is a low-cost microcontroller board from the Raspberry Pi Foundation. It has a breadboard-friendly layout and many pins for input and output, but the only built-in I/O device is a single LED. It is our workhorse for building embedded devices and is Physcomp Lab part 1005.

CircuitPython Universal Examples

The following samples are purely computational and should apply to any CircuitPython platform.

Raspberry Pi Pico 2W

../_images/Pico-2W-thumb.jpg

The “2W” version of the Raspberry Pi Pico 2 includes a faster CPU, more memory, and a WiFi transceiver.

Adafruit Circuit Playground Bluefruit

../_images/cpb-thumb.jpg

The Circuit Playground Bluefruit (CPB) is a microcontroller board sold by Adafruit which includes several useful sensors, color NeoPixel LEDs, and accessible electrical contacts.

Adafruit Crickit with Circuit Playground Bluefruit

../_images/crickit-cpb-thumb.jpg

The Adafruit Cricket is a baseboard which accepts an Circuit Playground Bluefruit (CPB) on top and adds motor drivers, servo output connectors, motor power input, and more.

Cytron Maker Pi RP2040

../_images/cytron-maker-pi-rp2040-thumb.jpg

The Cytron Maker Pi RP2040 board integrates a RP2040 microcontroller with hardware suitable for a small robot: two DC motor drivers, four servo connectors, battery input, LED indicators, switches, and seven Grove connectors.

Cytron Maker Pi with Pi Pico

../_images/cy-mpi-pico-thumb.jpg

The Cytron Maker Pi Pico is a carrier board for a Raspberry Pi Pico which includes buttons, LEDS, speaker, audio jack, SD card slot, and Grove connectors. It doesn’t include the Pi Pico itself.