4 import RPi.GPIO as GPIO
9 # tell the GPIO module that we want to use the
10 # chip's pin numbering scheme
11 GPIO.setmode(GPIO.BCM)
12 GPIO.setup(26,GPIO.IN, pull_up_down=GPIO.PUD_UP)
14 pygame.mixer.music.load("/media/usb0/muzika.mp3")
16 # setup pin 25 as an output
18 # GPIO.setup(24,GPIO.OUT)
19 # GPIO.setup(25,GPIO.OUT)
22 # GPIO.output(25,True)
26 # the button is being pressed, so turn on the green LED
27 # and turn off the red LED
28 # GPIO.output(24,True)
29 # GPIO.output(25,False)
33 pygame.mixer.music.play()
35 while pygame.mixer.music.get_busy() == True:
40 # the button isn't being pressed, so turn off the green LED
41 # and turn on the red LED
42 # GPIO.output(24,False)
43 # GPIO.output(25,True)
44 # print "button false"
54 if __name__=="__main__":