GPIO type

This commit is contained in:
JonOfUs 2024-08-21 14:48:01 +02:00
parent 101ac674ed
commit aecaf6e9ba

View file

@ -31,7 +31,7 @@ toggle_switch_right_pin = 14
# Cleanup GPIO to avoid "channel already in use" errors
GPIO.cleanup()
GPIO.setmode(GPIO.Board)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(button_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(toggle_switch_left_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(toggle_switch_right_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
@ -261,4 +261,4 @@ try:
kit()
time.sleep(0.1)
except KeyboardInterrupt:
GPIO.cleanup()
GPIO.cleanup()