AFL.automation.loading.PiPlatesRelay#

Classes

MultiChannelRelay()

PiPlatesRelay(relaylabels[, board_id])

class AFL.automation.loading.PiPlatesRelay.PiPlatesRelay(relaylabels, board_id=0)[source]#
__init__(relaylabels, board_id=0)[source]#

Init connection to a labeled Pi-Plates Relay module.

Params: relaylabels (dict):

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

board_id (int, default 0):

board ID to connect to, set via jumpers on the board.

setAllChannelsOff()[source]#
setChannels(channels, verify=True)[source]#

Write a value (True, False) to the channels specified in channels

Parameters: channels (dict):

dict of channels, keys as either str (name) or int (id) to write to, vals as the value to write

getChannels(asid=False)[source]#

Read the current state of all channels

Parameters: asid (bool,default false): Dict keys should simply be the id, not the name.

Returns: (dict) key:value mappings of state.

toggleChannels(channels)[source]#