Created
September 19, 2014 21:29
-
-
Save lesp/1caf800c798395375178 to your computer and use it in GitHub Desktop.
Main Loop
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
while True: | |
if GPIO.input(r13) == True: | |
print("button pressed") | |
sleep(0.5) | |
play_sound(ladder) | |
elif GPIO.input(r39) == True: | |
print("button pressed") | |
sleep(0.5) | |
play_sound(ladder) | |
elif GPIO.input(r67) == True: | |
print("button pressed") | |
sleep(0.5) | |
play_sound(ladder) | |
elif GPIO.input(r72) == True: | |
print("button pressed") | |
sleep(0.5) | |
play_sound(ladder) | |
elif GPIO.input(s38) == True: | |
print("button pressed") | |
sleep(0.5) | |
play_sound(snake) | |
elif GPIO.input(s47) == True: | |
print("button pressed") | |
sleep(0.5) | |
play_sound(snake) | |
elif GPIO.input(s68) == True: | |
print("button pressed") | |
sleep(0.5) | |
play_sound(snake) | |
elif GPIO.input(s99) == True: | |
print("button pressed") | |
sleep(0.5) | |
play_sound(snake) | |
elif GPIO.input(button) == True: | |
dice() | |
sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment