Skip to content

Instantly share code, notes, and snippets.

@todbot
todbot / cirpy-showpins.py
Last active July 30, 2025 11:25
Find the defined board.* pins for a CircuitPython board, given a repo directory
#!/usr/bin/env python3
# Find all the defined pins for a CircuitPython board
# 5 Jul 2025 - @todbot / Tod Kurt
# e.g. "cirpy-showpins.py qtpy_m0 ~/projects/adafruit/circuitpython"
# Note: you need a checkout of the CircuitPython github repo for this tool to work
# e.g. "mkdir -f ~/projects/adafruit && cd ~/projects/adafruit && git checkout https://github.com/adafruit/circuitpython/"
import os, sys, re
if len(sys.argv) <= 1:
@anecdata
anecdata / code.py
Last active July 27, 2024 01:50
TileGrid terminalio
import sys
import board
import displayio
import terminalio
display = board.DISPLAY # or equivalent external display library
splash = displayio.Group()
fontx, fonty = terminalio.FONT.get_bounding_box()