Skip to content

̶L̶e̶t̶'̶s̶ ̶g̶e̶t̶ ̶p̶h̶y̶s̶i̶c̶a̶l̶,̶ ̶p̶h̶y̶s̶i̶c̶a̶l̶. A library for circuitpython to access pins on feather boards by their physical number/location

License

pimoroni/physical_feather_pins

Repository files navigation

Physical Feather Pins

A library to provide consistent pin access between different feathers.

(Modification of https://github.com/ATMakersOrg/HoldingArea/blob/master/FeatherTemplate.svg)

Example

Original Code:

import board, digitalio
pin16 = digitalio.DigitalInOut(board.D4) # works on M4, but not M0 or nRF52840
pin16.switch_to_output()
pin16.value = True

Using Physical Feather Pins:

import pimoroni_physical_feather_pins, digitalio
pin16 = digitalio.DigitalInOut(pimoroni_physical_feather_pins.pin16())
# works on all feathers with a gpio there, gives a verbose error on M0 for example, note the parentheses
pin16.switch_to_output()
pin16.value = True

Tested

  • M4 Express
  • M0 Express
  • nRF52840 Express
  • Feather STM32F405 Express
  • Feather S2

Untested but should work

  • Adafruit Feather M0 Adalogger
  • Adafruit Feather M0 Basic
  • Adafruit Feather M0 RFM69
  • Adafruit Feather M0 RFM9x

About

̶L̶e̶t̶'̶s̶ ̶g̶e̶t̶ ̶p̶h̶y̶s̶i̶c̶a̶l̶,̶ ̶p̶h̶y̶s̶i̶c̶a̶l̶. A library for circuitpython to access pins on feather boards by their physical number/location

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages