Page 1 of 1

ToneAC on stm32

Posted: Wed Mar 20, 2024 11:45 am
by geologic
Hi all

I've used ToneAC library with arduino Uno (https://bitbucket.org/teckel12/arduino-toneac/wiki/Home), i tried to compile it with STM32duino but it is not compatible.
Do you know any alternative? I would like to play some louder sounds than tone library on a passive buzzer.

Thanks

Re: ToneAC on stm32

Posted: Wed Mar 20, 2024 12:28 pm
by ag123
you can try playing with the hardware timer and PWM
https://github.com/stm32duino/Arduino_C ... er-library
https://github.com/stm32duino/STM32Exam ... dwareTimer

but that if that is some form of sigma delta DAC
https://en.wikipedia.org/wiki/Delta-sigma_modulation
it would take some codes and circuits to achieve it.

for 'louder' sound, you need a transistor or amplifier
https://github.com/ag88/stm32duino_rtttl