gpio Module¶
GpioInput Class¶
-
class
tallypi.inputs.gpio.GpioInput(*args, **kwargs)[source]¶ Bases:
tallypi.common.BaseInputA single tally input using a GPIO pin on the RPi
- Parameters
config (SingleTallyConfig) – The initial value for
configpin – Initial value for
pin
-
__init__(config: tallypi.common.SingleTallyConfig, pin: int)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
screen: tslumd.tallyobj.Screen¶ A
tslumd.tallyobj.Screeninstance for the input
-
tally: tslumd.tallyobj.Tally¶ A
tslumd.tallyobj.Tallyinstance for the input
-
classmethod
get_init_options() → Tuple[tallypi.config.Option][source]¶ Get the
config.Optiondefinitions required for this object
-
get_screen(screen_index: int) → Optional[tslumd.tallyobj.Screen][source]¶ Get a
Screenobject by the given indexIf no screen exists,
Noneis returned
-
get_all_screens() → Iterable[tslumd.tallyobj.Screen][source]¶ Get all available
Screeninstances for the input
-
get_tally(tally_key: Tuple[int, int]) → Optional[tslumd.tallyobj.Tally][source]¶ Get a
Tallyobject by the given keyIf no tally information exists for this input,
Noneis returned- Parameters
tally_key (tslumd.common.TallyKey) – A tuple of (
screen_index,tally_index) formatted asSingleTallyConfig.tally_key
-
get_all_tallies(screen_index: False) → Iterable[tslumd.tallyobj.Tally][source]¶ Get all available
Tallyinstances for the input- Parameters
screen_index (int, optional) – If present, only include tallies within the specified screen