Skip to content

Buzzer randomly does not stop buzzing #9

@rragan

Description

@rragan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions