def applenoise(): speakerPlayNote(800, 0.3) time.sleep( 0.1 ) # THIS SLEEP IS ONLY HERE BECAUSE OF BROKEN SPEAKER, WE CAN SWITCH AFTER speakerPlayNote(1000, 0.3) time.sleep(0.1)
def deathnoise(): speakerPlayNote(300, 0.3) time.sleep(0.3) speakerPlayNote(200, 0.3) time.sleep(0.3) speakerPlayNote(100, 0.3) time.sleep(0.3)
def applenoise(): #The noise that will play when a player picks up an apple speakerPlayNote(4,800, 0.2) speakerPlayNote(4,1000, 0.2)
# print("down") return 'D' if Y < X and Y < (-1) * X: # print(X, Y) # print("left") return 'L' def applenoise(): #The noise that will play when a player picks up an apple speakerPlayNote(4,800, 0.2) speakerPlayNote(4,1000, 0.2) def deathnoise() #The noise that will player when a player dies speakerPlayNote(4,300, 0.3) speakerPlayNote(4,200, 0.3) speakerPlayNote(4,100, 0.7) def buttonpress(): #This function checks to see if the button has pressed b = arduinoDigitalRead(2) return b def clear(): #This function clears the screen X, Y = 750, 750 Size = (X, Y) display_surface = pygame.display.set_mode(Size) pygame.display.update()
def deathnoise(): speakerPlayNote(4, 300, 0.3) speakerPlayNote(4, 200, 0.3) speakerPlayNote(4, 100, 0.7)
def applenoise(): speakerPlayNote(4, 800, 0.2) speakerPlayNote(4, 1000, 0.2)
def deathnoise(): #The noise that will player when a player dies speakerPlayNote(4, 300, 0.3) speakerPlayNote(4, 200, 0.3) speakerPlayNote(4, 100, 0.7)