Very simple question I know but can anyone help me get a buzzer to play a simple tune.
I have a 12mm piezo buzzer and a pyboard and I'm trying to play a simple tune from the buzzer, ie just a couple of notes. I'm pretty new to coding so have been trying to find a tutorial to follow. So far I've gone through these ones below with no luck.
https://wiki.mchobby.be/index.php?title ... Hack-piezo
http://wiki.micropython.org/Play-Tone
https://learn.sparkfun.com/tutorials/ge ... g-a-buzzer
I can connect the buzzer to a battery and get a click sound and I can generate the same click sound though the USR button but thats about it. Can anyone direct me to a better tutorial or help me figure out how to get this going?:) Also I have another two buzzers that both produces a continuous tune when connected to battery.
Thank you:)
Simple Buzzer Help Please :)
Re: Simple Buzzer Help Please :)
Thanks for sharing this.
I've tried to follow what you've done but I'm connected an external speaker, not one one the board. I've tried using your code and replacing the pin definition from pyb.Pin.board.BUZZER to pyb.Pin.board.Y1 without much luck:S
I've tried to follow what you've done but I'm connected an external speaker, not one one the board. I've tried using your code and replacing the pin definition from pyb.Pin.board.BUZZER to pyb.Pin.board.Y1 without much luck:S
Re: Simple Buzzer Help Please :)
Just got it to work!!! I didn't have the channels, timers and pin correctly labeled first time around. Thank you very much for your help!