Change Pin Layout

This commit is contained in:
JonOfUs 2024-08-21 14:51:09 +02:00
parent aecaf6e9ba
commit 93e01cd7f8

View file

@ -24,14 +24,14 @@ strip_blinker.begin()
strip_animation.begin() strip_animation.begin()
# Button and switch GPIO setup # Button and switch GPIO setup
button_pin = 18 button_pin = 16
toggle_switch_left_pin = 15 toggle_switch_left_pin = 20
toggle_switch_right_pin = 14 toggle_switch_right_pin = 21
# Cleanup GPIO to avoid "channel already in use" errors # Cleanup GPIO to avoid "channel already in use" errors
GPIO.cleanup() GPIO.cleanup()
GPIO.setmode(GPIO.BOARD) GPIO.setmode(GPIO.BCM)
GPIO.setup(button_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) 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_left_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(toggle_switch_right_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setup(toggle_switch_right_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)