-
-
Save davipo/1ebf9dc3216c14068b12 to your computer and use it in GitHub Desktop.
Setup inputs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GPIO.setup(r13,GPIO.IN, pull_up_down = GPIO.PUD_DOWN) | |
| GPIO.setup(r39,GPIO.IN, pull_up_down = GPIO.PUD_DOWN) | |
| GPIO.setup(r67,GPIO.IN, pull_up_down = GPIO.PUD_DOWN) | |
| GPIO.setup(r72,GPIO.IN, pull_up_down = GPIO.PUD_DOWN) | |
| GPIO.setup(s38,GPIO.IN, pull_up_down = GPIO.PUD_DOWN) | |
| GPIO.setup(s47,GPIO.IN, pull_up_down = GPIO.PUD_DOWN) | |
| GPIO.setup(s68,GPIO.IN, pull_up_down = GPIO.PUD_DOWN) | |
| GPIO.setup(s99,GPIO.IN, pull_up_down = GPIO.PUD_DOWN) | |
| GPIO.setup(button,GPIO.IN, pull_up_down = GPIO.PUD_DOWN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for pin in [r13, r39, r67, r72, s38, s47, s68, s99, button]: | |
| GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
inputs.py uses a list of inputs to handle the repetition.