Skip to content

CircuitPython Parsec

The CircuitPython Parsec is a weekly video hosted by John Park of Adafruit. Each video offers a quick tip with CircuitPython and is generally around 2 minutes or less in length.

Here's the complete youtube playlist

Individual CircuitPython Parsec videos with descriptions

Some tips on finding out which board type and version of Circuit Python you're running, more at :

import os
print (os.uname().machine)
print (os.uname().version)   # NOTE: this only prints the version for CircuitPython on embeded devices
print (os.uname())

import board
board.[tab]  # press tab for auto-completion - similar to auto-complete on bash

python3 -m venv ~/.virtualenvs/circup
. ~/.virtualenvs/circup/bin/activate

(circup) jliu@JEFFREYs-MBP ~/Downloads/CircuitPython/circuitpython-class % python --version
Python 3.8.2

pip install circup

(circup) jliu@JEFFREYs-MBP /Volumes/CIRCUITPY/lib % circup bundle-show
 version = 20210921
 version = 20210921
 version = 0.0.3

cd /Volumes/CIRCUITPY/lib

circup install adafruit_debouncer

circup uninstall adafruit_debouncer

(circup) jliu@JEFFREYs-MBP ~/Downloads/CircuitPython/circuitpython-class % ls -lrt ~/Library/Application\ Support/circup
total 34080
-rw-r--r-- 1 jliu staff 6901917 Sep 20 12:21
-rw-r--r-- 1 jliu staff 4426830 Sep 20 12:21
-rw-r--r-- 1 jliu staff 3468520 Sep 20 12:21
-rw-r--r-- 1 jliu staff 1247376 Sep 20 12:21
-rw-r--r-- 1 jliu staff  766679 Sep 20 12:21
-rw-r--r-- 1 jliu staff  593322 Sep 20 12:21
drwxr-xr-x 8 jliu staff 256 Sep 20 12:21 adafruit
-rw-r--r-- 1 jliu staff 11320 Sep 20 12:21
-rw-r--r-- 1 jliu staff  5506 Sep 20 12:21
-rw-r--r-- 1 jliu staff  4992 Sep 20 12:21
drwxr-xr-x 5 jliu staff 160 Sep 20 12:21 circuitpython
-rw-r--r-- 1 jliu staff 160 Sep 20 12:21 circup.json

(circup) jliu@JEFFREYs-MBP ~/Downloads/CircuitPython/circuitpython-class % du -sh ~/Library/Application\ Support/circup
49M  /Users/jliu/Library/Application Support/circup

(circup) jliu@JEFFREYs-MBP /Volumes/CIRCUITPY/lib % circup freeze > ../requirements.txt

(circup) jliu@JEFFREYs-MBP /Volumes/CIRCUITPY/lib % circup uninstall adafruit_debouncer
Found device at /Volumes/CIRCUITPY, running CircuitPython 6.3.0.
A newer version of CircuitPython (7.0.0) is available.
Get it here:
Uninstalled 'adafruit_debouncer'.

(circup) jliu@JEFFREYs-MBP /Volumes/CIRCUITPY/lib % circup install -r ../requirements.txt
Found device at /Volumes/CIRCUITPY, running CircuitPython 6.3.0.
A newer version of CircuitPython (7.0.0) is available.
Get it here:
Searching for dependencies for: ['a newer version of circuitpython (7.0.0) is available.', 'adafruit_debouncer', 'found device at /volumes/circuitpy, running circuitpython 6.3.0.', 'get it here:']
    a newer version of circuitpython (7.0.0) is available. is not a known CircuitPython library.
    found device at /volumes/circuitpy, running circuitpython 6.3.0. is not a known CircuitPython library.
    get it here: is not a known CircuitPython library.
Ready to install: ['adafruit_debouncer']

Installed 'adafruit_debouncer'. Support for community bundle and future bundles NOTE: by default the DATA_DIR/circup directory on Mac is ~/Library/Application\ Support/circup

find ~ -name circup.json
/Users/jliu/Library/Application Support/circup/circup.json

(circup) jliu@JEFFREYs-MBP ~  % cd Library/Application\ Support/circup 

(circup) jliu@JEFFREYs-MBP ~/Library/Application Support/circup  % ls -lrt
total 35752
-rw-r--r--  1 jliu  staff  11320 Sep 21 11:55
-rw-r--r--  1 jliu  staff   5506 Sep 21 11:55
-rw-r--r--  1 jliu  staff   4992 Sep 21 11:55
drwxr-xr-x  5 jliu  staff  160 Sep 21 11:55 circuitpython
-rw-r--r--  1 jliu  staff  4531939 Dec  5 10:25
-rw-r--r--  1 jliu  staff  1398845 Dec  5 10:25
-rw-r--r--  1 jliu  staff   866768 Dec  5 10:25
-rw-r--r--  1 jliu  staff   655732 Dec  5 10:25
-rw-r--r--  1 jliu  staff  7197908 Jan  1 19:44
-rw-r--r--  1 jliu  staff  3607698 Jan  1 19:44
drwxr-xr-x  8 jliu  staff  256 Jan  1 19:44 adafruit
-rw-r--r--  1 jliu  staff  160 Jan  1 19:44 circup.json

(circup) jliu@JEFFREYs-MBP ~/Library/Application Support/circup  % du -sh .
 51M   .
- [ ] minipip: a tool for installing distribution packages for MicroPython and CircuitPython #CircuitPython #MicroPython

- [ ] pipkin - successor to minipip, included with Thonny 4

  • Servo Animation List (9/24/2021)
  • Servo Easing (10/1/2021) Use this simple technique to ease the motion of your servo motors and avoid sudden, jerky halting!
  • CPU Temperature (10/8/2021)
  • (10/14/2021) Use the file to prevent the CIRCUITPY drive from showing up when you don’t want it to!
  • Random Delay (10/25/2021)
  • Dual NeoPixel Rings (10/29/2021)
  • Sine Wave Tones (11/8/2021) Debouncer and PWM audio example for CircuitPython Bluefruit
  • Free Memory (11/15/2021) Check your board’s free memory with the Garbage Collector. Example from the REPL:
import gc
['__class__', '__name__', 'collect', 'disable', 'enable', 'isenabled', 'mem_alloc', 'mem_free']


from adafruit_led_animation.color import *

## NOTE: so there is no difference if you just import individual colors
from adafruit_led_animation.color import CYAN
  • Keyword Arguments (11/19/2021)
  • Print w/o Newline Improve your serial output by printing without newline! (12/6/2021) (also see 8/12/2022)
  • Pixel Patterns Create patterns of NeoPixels using for loops and the range() command. (12/13/2021)
  • Fake Ground Pin (12/17/2021)
  • Linear Interpolation (1/7/2022) lerp() is a simple function to do linear interpolation between two values, for example RGB color mixing.
  • Capacitive Touch Sensing (1/14/2022) Learn to use capacitive touch pins in CircuitPython for simple touch sensing!
  • User Input (1/22/2022) You can employ typed user input from the USB serial REPL in your CircuitPython code.
  • WiFi Sniffing (1/31/2022) You can sniff for WiFi networks in CircuitPython on ESP-32 S2 with just a tiny bit of code!
  • Dictionaries (2/7/2022) Use dictionaries in CircuitPython to organize and access your data!
  • Wav Audio Crossfader (2/14/2022) Crossfade looping audio files with the audio mixer in CircuitPython.
  • DisplayIO Fill (2/18/2022) Use this simple trick to display shapes on TFT and OLED displays using displayio and fill.
  • DisplayIO Movement (2/25/2022) How to move screen shapes with DisplayIO.
  • DisplayIO Text (3/7/2022) How to use Text Labels with DisplayIO
  • DisplayIO Rotation (3/12/2022) Use display.rotation() to re-orient your screen.
  • DisplayIO Palette Swap (3/20/2022) Swap out each color in an bitmap palette for a cool image effect.
  • VectorIO Circle and Rectangle (3/28/2022) VectorIO is a lightweight 2D shapes library for DisplayIO
  • VectorIO polygonal shapes (4/1/2022) Introducing vectorIO polygonal shapes — VectorIO is a lightweight, 2D shape drawing library for displayio in CircuitPython.
  • Touchscreen (4/8/2022) How to use a touchscreen in CircuitPython.
  • Transparent Sprites (4/15/2022)
  • Mouse Cursor (5/6/2022)
  • Cursor Control (5/13/2022) It’s simple to made cool disco light patterns for NeoPixels using random integers for color component values.
  • Bi-color LED Matrix (5/20/2022)
  • NTP time server (5/27/2022) Learn to set your board's RTC (real time clock) with the NTP time server using CircuitPython. ESP32-S2 TFT Feather: Base template found here:
  • Random Range Tones (6/2/2022) You can play back “computery/roboty” bleeps with random.randomrange() and random.uniform() to define pitch and duration in CircuitPython.
  • Pixelmap (6/17/2022) Use the PixelMap feature of the led_animation library to create multiple logical strips from a single physical NeoPixel strip, grid, or ring!
  • TileGrid Sprite Sheet (6/24/2022) Create dynamic user interface elements using TileGrid Sprite Sheets.
  • SVG to VectorIO (7/1/2022) Convert SVG graphics to VectorIO shapes for use with CircuitPython. Thanks to Todbot for this cool method! Use PathToPoints to format the SVG into CircuitPython code.
  • Pixel Framebuf (7/8/2022) Easily display shapes, pixels, and lines on a DotStar or NeoPixel grid using pixel_framebuf in CircuitPython.
  • List parsing (7/17/2022) Learn how to use the 'sort()' command to sort lists into alphabetical-, reverse-, size- and other useful orders.
  • tio - a simple serial device I/O tool (7/22/2022) Check out ‘tio’ the Serial IO tool for any operating system that makes it painless to debug your microcontroller, even when resetting or power cycling your board. To make a simpler serial device tool for talking with serial TTY devices with less focus on classic terminal/modem features and more focus on the needs of embedded developers and hackers. tio was originally created to replace screen for connecting to serial devices when used in combination with tmux.
  • discotool (8/1/2022) Use discotool to make your CircuitPython REPL adventures much friendlier! If you have multiple devices connected, it will display friendly names and allows you to connect via them. Seems to be based off tio.
    Can also call subcommands for circup update etc.
  • Carriage Return (8/12/2022) Use 'end='\r'' carriage return to prevent newlines in your print statements. (also see 12/6/2021)
  • Mode Select (8/22/2022) Create a mode select in your CircuitPython code that runs at the start of the program, allowing users to choose settings.
  • Range (9/2/2022) Adjust the step size of loop iteration with range(start, stop, step)
  • Progress Bars (9/9/2022) Create horizontal progress bars in CircuitPython. It's easy, fun, and low calorie.
  • Bitmap Snow (9/16/2022) Draw randomized pixels in a bitmap object to create multicolored "snow" using CircuitPython.
  • Bitmap Line Drawing (9/26/2022) Make a DIY line drawing function for bitmap pixels in CircuitPython.
  • USB Brightness Control (9/30/2022) Build a custom brightness controller for your computer or mobile device using CircuitPython.
  • Boot_Out.txt (10/10/2022) That mysterious 'boot_out.txt' file on your CircuitPython board isn't so mysterious after all!
  • Deep Sleep (10/16/2022) Use the alarm library to send your microcontroller into deep sleep and then wake up later.
  • Bluetooth Naming (10/22/2022) Give your Bluetooth Low Energy object descriptive advertised name in CircuitPython. = "BLE Midid Fader"
  • numpy LED Fades (10/28/2022) Speed up LED fades with numpy!
  • File Glider iOS App (11/18/2022) Code your BLE CircuitPython device right from your mobile device with the Adafruit File Glider app for iOS and Android!
  • Incremental Iteration (11/28/2022) How iterate incrementally with a loop within a loop.
  • Blink Without Delay (12/5/2022) How to use timing intervals in CircuitPython without blocking your code.
  • Timing with Ticks (12/8/2022)
  • I2C Scanning (12/26/2022) Scan the I2C bus for device addresses in CircuitPython.
import board

i2c = board.I2C() # or busio.I2C(pin_scl,pin_sda)

while not i2c.try_lock():

print("I2C addresses found: ", [hex(device_address) for device_address in i2c.scan()])

  • Using SNES Controllers (1/2/2023) How to use Super Nintendo controllers in CircuitPython with the keypad library.

  • Long vs Short Press (1/6/2023) You can use a single button to mean two different things depending on how long you press it! Learn how to use a short duration vs. a long duration button press in CircuitPython (adafruit_debouncer library).

  • Multi Clicks (1/13/2023) Enable single-click/double-click button functions in CircuitPython!

  • I2S Audio Pins (1/20/2023) Use CircuitPython to determine valid sets of pins on your microcontroller to use with I2S audio. Code is here:

  • List Filtering (1/27/2023) Get more (less?) out of lists with List Filtering!

  • Iterate Up and Down (2/3/2023) Iterate up and down in your for loops to count up & down and cycle behaviors.

Additional References

This page was last updated on 2023-02-03 17:25:07 -0500.