How to set GPIO high on RasPi when sound is played
Aleady some time - a year ago I bought couple of simple Easy Digi devices from KF5INZ. Accidentaly I got one extra - there was some mistake. I offered to send it back, but as shipping was costly, than seller kindly left it as bonus.
At that time I hoped, that it can help me to pair my old Kenwood TS-50S with PC and do some digital modes, but it was not so easy as that radio has pretty old and there was not so much info on PC interfacing on net. So these Easy Digi Boxes has almoust forgoten until I finaly decided to buy and tinker around RasPi. The idea was similar - to do some interfacing with a radio. But in this case at first to try to make some simple tasks, like simple parrot repeater, auto transmission recorder or pair with some voice recognition AI software.
I had some success with Mycroft AI on my big linux box, when I used it with Easy Digi and some handheld with VOX option activated. I could ask questions and got anwers by using another handheld radio. Those was Che-Chi PoC radios like UV-5R or similar and I was not satisfied about VOX stability. So I was thinking how to fire PTT line on sound output.
I got near solution when started to tinker around RasPi. Here also some note on Easy Digi - it is actualy as very simple device with two sound transformers for RF isolation and also simple orthocoupler circuit for shorting PTT lines. It can be used with some serial port programming or for RasPi case gpio programing.
I was not very succesful for diging some samples for serial port programming on linux, but for RasPi there was plenty info regarding gpoi programing and samples. So my joyrney was suucessfull.
So bellow is my notes how to achieve this task - set gpio high on RasPi when sound is played. Then we can use gpio voltage level to switch on some device or “push PTT” on the transceiver.
Continue reading