Hi, I would like to drive a piezo buzzer with two pins from an Attiny85 to make the sound louder and cleaner. Is there a library or sample code that I can use?
This question is very similar, but it's from 8 years ago, and I was wondering if anyone has made/published anything since then. Unfortunately the topic is locked and I can't comment on it.
This is the piezo speaker that I am currently using:
It is connected to PB4 of Attiny85 and ground. 3v circuit, 1MHz internal clock. Programmed with Arduino as ISP, ATTinycore, tone() from Arduino IDE. Is there anything that I should change to get the cleanest sound from what I currently have?
I am aware that larger piezos will give better sound, and will look into that in the future.
Thanks in advance for your help.