parent
667eb93b76
commit
a49ed2086f
2
main.py
2
main.py
|
@ -32,6 +32,8 @@ def relay_controller(pin: int, state: str):
|
|||
# relay = gpiozero.OutputDevice(pin, active_high=False, initial_value=False)
|
||||
# relay.on()
|
||||
GPIO.output(pin, GPIO.LOW)
|
||||
time.sleep(1)
|
||||
GPIO.output(pin, GPIO.HIGH)
|
||||
debug_print("Set relay-pin "+str(pin)+" to state True")
|
||||
elif state == "False":
|
||||
# relay = gpiozero.OutputDevice(pin, active_high=False, initial_value=False)
|
||||
|
|
Loading…
Reference in New Issue