from time import sleep
# import custom music module
import music
# Define notes
C4 = 262
D4 = 294
E4 = 330
F4 = 349
G4 = 392
# Setup the buzzer at pin1
music.setup_buzzer(1)
def play(note, wait):
music.play_note(note)
sleep(wait)
music.stop_note()
while True:
play(C4, 0.25)
play(C4, 0.25)
play(D4, 0.5)
play(C4, 0.5)
play(F4, 0.5)
play(E4, 1)
play(C4, 0.25)
play(C4, 0.25)
play(D4, 0.5)
play(C4, 0.5)
play(G4, 0.5)
play(F4, 1)
sleep(1) # pause before repeating