buzzer_music icon indicating copy to clipboard operation
buzzer_music copied to clipboard

Buzzer randomly does not stop buzzing

Open rragan opened this issue 2 years ago • 0 comments

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.

rragan avatar Dec 10 '22 21:12 rragan