circuitpython/nrf/examples/musictest.py
Daniel Tralamazza e5802fd9f8 implement #50
2017-06-07 18:57:47 +02:00

14 lines
227 B
Python

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