I am looking to drive a piezo transducer at its resonant frequency (20kHz) to generate sound waves. I am doing an application similar to sonar technology.
I was looking into how to drive the transducer and I thought I would have to generate and feed it sine waves with its resonant frequency. I have access to an Arduino DUE, I was looking into how to do so and it seemed a bit complicated.
I was curious if anyone had any experience driving a piezo and if it would be possible to do so with just square waves. Or if they have experience generating sine waves of any frequency within an Arduino please let me know!