I have an application that visually displays alerts on an LCD when a threshold is passed, and I would like to add an audiable notifiation/alarm to this.
I have a basic buzzer/piezo hooked up to a PWM pin on a teensy 4.x with a transistor (NPN).
What I would like to do is be able to call a function that will "play" a series of beeps in intervals. So for example, play beep-beep-beep (200ms delays between them) and then stop and not play again for another 0.4 or 1.4 seconds.
I would like to use this library as it can play tones but can also control the volume via code (this is crucial to me, I can't use any additional hardware to control the volume)
Does anyone have a suggestion on how to acheive this? The code needs to be none blocking as well.
I have a basic buzzer/piezo hooked up to a PWM pin on a teensy 4.x with a transistor (NPN).
What I would like to do is be able to call a function that will "play" a series of beeps in intervals. So for example, play beep-beep-beep (200ms delays between them) and then stop and not play again for another 0.4 or 1.4 seconds.
I would like to use this library as it can play tones but can also control the volume via code (this is crucial to me, I can't use any additional hardware to control the volume)
Does anyone have a suggestion on how to acheive this? The code needs to be none blocking as well.