This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
GPIO_PATH = "/sys/class/gpio" # The root of the GPIO directories | |
EXPANDER = "pcf8574a" # This is the expander that is used on CHIP for the XIOs | |
def get_xio_base(): | |
''' | |
Determines the base of the XIOs on the system by iterating through the /sys/class/gpio | |
directory and looking for the expander that is used. It then looks for the | |
"base" file and returns its contents as an integer |