Methods defined here:
__init__(self, pin_button=19, button_poll_delay=0.05)
FAN Library. :param pin_button: BCM pin for button :button_poll_delay: Delay between polling of button
on_hold(self, handler=None)
Attach function to button hold event.
on_press(self, handler=None)
Attach function to button press event.
on_release(self, handler=None)
Attach function to button release event.
set_fan(self, fan_state)
Set the fan on/off. :param fan_state: True/False for on/off
set_hold_time(self, hold_time)
Set the button hold time in seconds. :param hold_time: Time button must be held to trigger on_hold
set_light(self, r, g, b)
Set LED. :param r: Red (0-255) :param g: Green (0-255) :param b: Blue (0-255)
start_polling(self)
Start button polling.
stop_polling(self)
Stop button polling.
|