james1236 / buzzer_music

RPI Pico / Micropython library to play music through one or more buzzers, can automatically replace chords with fast arpeggios to simulate polyphony with a single buzzer. Music can be easily taken from onlinesequencer.net
MIT License
83 stars 17 forks source link

Allow alternate pins #1

Closed GraphicHealer closed 3 years ago

GraphicHealer commented 3 years ago

Can you please add support to change the pin for other devices or use cases? That would be great.

james1236 commented 3 years ago

Would you rather use

music(song, pinNumber=3)

or

from machine import Pin

music(song, pin=Pin(3))

Edit: Decided on the second one