next test with GPIO relay controller
Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>master
parent
255481d7cf
commit
667eb93b76
1
main.py
1
main.py
|
@ -25,6 +25,7 @@ def error_print(message: str):
|
||||||
|
|
||||||
#relay
|
#relay
|
||||||
def relay_controller(pin: int, state: str):
|
def relay_controller(pin: int, state: str):
|
||||||
|
GPIO.cleanup()
|
||||||
GPIO.setmode(GPIO.BCM)
|
GPIO.setmode(GPIO.BCM)
|
||||||
GPIO.setup(pin, GPIO.OUT)
|
GPIO.setup(pin, GPIO.OUT)
|
||||||
if state == "True":
|
if state == "True":
|
||||||
|
|
Loading…
Reference in New Issue