GPIO type
This commit is contained in:
parent
101ac674ed
commit
aecaf6e9ba
1 changed files with 2 additions and 2 deletions
2
main.py
2
main.py
|
@ -31,7 +31,7 @@ toggle_switch_right_pin = 14
|
||||||
# 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.BOARD)
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue