Skip to content

Instantly share code, notes, and snippets.

Last active May 5, 2021
What would you like to do?
CircuitPython Pin Finder: to board mappings
import microcontroller
import board
for pin in dir(
if isinstance(getattr(, pin), microcontroller.Pin):
print("".join(("", pin, "\t")), end=" ")
for alias in dir(board):
if getattr(board, alias) is getattr(, pin):
print("".join(("", "board.", alias)), end=" ")

This comment has been minimized.

Copy link
Owner Author

@anecdata anecdata commented Feb 2, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment