[arm-allstar] How to use Raspberry Pi GPIO pins to connect and disconnect a node

Steve Sedgwick ssedgwick at suddenlink.net
Wed Feb 12 10:09:06 EST 2020


Hi Doug,

Thank you for your comments and suggested scripts.  I'm not much at 
writing scripts, but using the examples will sure make it easier to give 
it a try.

In the short term, I used the "phone dialer" option in my Kenwood TH-f6 
HT to "speed dial" the connect and disconnect codes.  This works OK, but 
I still need to take my eyes of the road for a couple seconds to find 
and press the correct keys while pressing the PTT button.  The idea of 
using a single button on my Allstar node which by the way is setting 
right next to me in the car appealed to me because I can "feel" for the 
button and press it without needing to take my eyes off the road.  Just 
pressing a single dedicated button that I don't have to look for really 
helps in the heavy traffic we have in the Dallas area.

Thanks again,

Steve_WB8GRS


Steve,

   I see other ways were suggested that may work for you but if you want to
do this with GPIO you can but it would involve writing a script to do it.
Rather than my writing a script example see
/usr/local/sbin/example_scripts/intruder_check.sh or power_fail_check.sh

Those scripts will give you examples of how to use the gpio command to
interrogate pins on the Pi. You would need to monitor two pins and execute
direct asterisk commands to connect and disconnect based on the status of
the pins. I am not sure this is a great way to do it but it could be made
to work if that is what you want to do. Be aware that while in your case
you would only be applying a ground to each pin to make it low you cannot
apply voltage to Pi GPIO pins of greater than 3 volts or you will damage
the Pi.


*73 Doug*

*WA3DSP*

*http://www.crompton.com/hamradio  <http://www.crompton.com/hamradio>*

On Wed, Jan 29, 2020 at 1:46 PM "Steve Sedgwick via ARM-allstar" <
arm-allstar at hamvoip.org  <http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar>> wrote:

>/Hi, />//>/Has anyone created a way to use two GPIO pins on a Raspberry pi node to />/connect and disconnect that node to another node or hub? What I want to />/be able to do is on my node I want to be able to press a pushbutton that />/is connected to a GPIO pin on my node and that press causes my node to />/connect to a predetermined node, for example connecting node 12345 to />/node 54321. I would also like to be able to press a second pushbutton />/and disconnect my node from a predetermined node, for example disconnect />/node 54321 from node 12345. I want this for my mobile node so I don't />/have to dial the normal node connection/disconnection sequences. It's a />/lot easier for me to press one button on my node than it is to press 7 />/or eight touch tone keys on a microphone or HT while drive down the road />/a 70 mph. />//>/Thanks, 73 />//>/Steve_WB8GRS/



More information about the ARM-allstar mailing list