next test with GPIO relay controller

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-14 10:49:22 +02:00
parent 255481d7cf
commit 667eb93b76
1 changed files with 2 additions and 1 deletions

View File

@ -25,8 +25,9 @@ def error_print(message: str):
#relay
def relay_controller(pin: int, state: str):
GPIO.cleanup()
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin, GPIO.OUT)
GPIO.setup(pin, GPIO.OUT)
if state == "True":
# relay = gpiozero.OutputDevice(pin, active_high=False, initial_value=False)
# relay.on()