Created
August 9, 2017 07:22
-
-
Save uktechreviews/e9a62e9643a3566b56199083d2b75a6b to your computer and use it in GitHub Desktop.
This file contains 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
from gpiozero import Button | |
button1 = Button(2) | |
button2 = Button(3) | |
def check_button(): | |
button_press = False | |
while button_press == False: | |
b1 = button1.value | |
b2 = button2.value | |
if b1 == True: | |
button_press = True | |
if b2 == True: | |
button_press = True | |
return b1,b2 | |
b1,b2 = check_button() | |
print (b1) | |
print (b2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment