summaryrefslogtreecommitdiff
path: root/ports/nrf/examples/musictest.py
blob: 8f4523877c379902e14a669e7e6c30c2eb91fe67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#
# 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)