if GPIO.input(26):
# the button is being pressed, so turn on the green LED
# and turn off the red LED
- # GPIO.output(24,True)
- # GPIO.output(25,False)
- print "button false"
+ # GPIO.output(24,True)
+ # GPIO.output(25,False)
+ #print "button false"
if odplayao == False:
- odplayao = True
- pygame.mixer.music.play()
- while pygame.mixer.music.get_busy() == True:
- continue
+ odplayao = True
+ pygame.mixer.music.play()
+ print('play')
+ while pygame.mixer.music.get_busy() == True:
+ continue
else:
- odplayao = False
- # print "button true"
+ odplayao = False
+ print "button true"
# the button isn't being pressed, so turn off the green LED
# and turn on the red LED
- # GPIO.output(24,False)
- # GPIO.output(25,True)
- # print "button false"
+# GPIO.output(24,False)
+# GPIO.output(25,True)
+# print "button false"
- time.sleep(0.1)
+ time.sleep(0.1)
print "button pushed"