Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buzzer randomly does not stop buzzing #9

Open
rragan opened this issue Dec 10, 2022 · 0 comments
Open

Buzzer randomly does not stop buzzing #9

rragan opened this issue Dec 10, 2022 · 0 comments

Comments

@rragan
Copy link

rragan commented Dec 10, 2022

I'm playing a song on game win using an active piezo buzzer on a Raspberry Pi Pico. Mostly it works fine. Randomly it seems to "freeze" and leave the buzzer on. Power cycling stops the noise.

Code logic is
song = '0 E5 3 14;3 .....'
mySong = music(song, pins=[Pin(15)])
for i in range(len(song)):
mySong.tick()
time.sleep(0.04)
mySong.stop()
buzzer.off()
time.sleep(1.0)
lcd.clear()
lcd.putstr('Press Start')

Any ideas? I added the extra buzzer.off() to further try to shut it down (buzzer is Pin 15) though the stop() call ought to take care of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant