georgroth wrote: ↑Wed May 13, 2020 9:06 am
Sorry guys for not being accurate.
I have connected the buzzer via GIPO pin 22 - that's it. The sound is triggered via a camera. If an object is crossing the cam, then the buzzer beeps.
Re mobile app: no, I dont have an app that makes a sound via bluetooth but I assume this should be available....
Cheers, Georg
To send sound to a BT headset or speaker you need to play an audio file and route the audio to the BT audio device.
You could download a buzzer sound file and play it with aplay or mpg123 (command line) or maybe pygame.mixer.music.play() in your Python code.
If you want the headset sound to match the physical buzzer you could record the sound of the buzzer, maybe using a sound recorder app on your phone or tablet, or using a USB webcam or USB audio card with microphone. Maybe edit the sound in audacity. Save in .wav or .ogg or .mp3 or something. .wav "pcm" is a bit easier to use.
So when you actuvate the gpio to sound the physical buzzer also start the buzzer sound playing at the same time.
It seems there may be some more you have to do to get Pygame to output to a BT audio. If you want only the buzzer sound on BT, with other system audio to HDMI, that probably needs extra steps.
Some info here