diff --git a/main.py b/main.py index 7c81bbf..158e6ad 100644 --- a/main.py +++ b/main.py @@ -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()