AFL.automation.loading.PiGPIO#

Classes

PiGPIO(channels[, mode, pull_dir])

class AFL.automation.loading.PiGPIO.PiGPIO(channels, mode='BCM', pull_dir='UP')[source]#
__init__(channels, mode='BCM', pull_dir='UP')[source]#

Initializes GPIO pins in channels and maps their values to a local dict.

Params: channels (dict):

mapping of pin id to load name, e.g. {0:’arm_up’,1:’arm_down’}

mode (str, ‘BCM’ or ‘BOARD’, default BCM):

pin numbering scheme to use

pull_dir (str or dict, default ‘up’)

if string, ‘UP’ or ‘DOWN’ direction to pull all pins if dict, key = pin number, val = ‘UP’ or ‘DOWN’

eventcb(channel)[source]#

In response to an edge detect, read a channel and update the local state dict.