From aecaf6e9ba9718d3c66e6c92fdd99c5833266b76 Mon Sep 17 00:00:00 2001 From: JonOfUs Date: Wed, 21 Aug 2024 14:48:01 +0200 Subject: [PATCH] GPIO type --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 9bbaa4b..031e1a7 100644 --- a/main.py +++ b/main.py @@ -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() \ No newline at end of file + GPIO.cleanup()