You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
227 B

#
# Example usage where "P3" is the Buzzer pin.
#
# from musictest import play
# play("P3")
#
from machine import Pin
import music
def play(pin_str):
p = Pin(pin_str, mode=Pin.OUT)
music.play(music.PRELUDE, pin=p)