1
Setting up the GPIO ports
We need to setup the GPIO ports. The simplest way is to add the following lines to the file rc.local.">rc.local.
sudo nano /etc/rc.local
################
#GPIO SCRIPT #
#TO BE INSERTED#
#ON START-UP #
################
# GPIO 17 as PTT to TX2
echo 17 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio17/direction
sudo chmod 777 /sys/class/gpio/gpio17/value
Powered by wordads.co
Seen ad many times
Not relevant
Offensive
Covers content
Broken
REPORT THIS AD
Powered by wordads.co
Seen ad many times
Not relevant
Offensive
Covers content
Broken
REPORT THIS AD
# GPIO 18 as Squelch to RX2
echo 18 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio18/direction
sudo chmod 777 /sys/class/gpio/gpio18/value
#GPIO 24 as PTT to TX1
echo 24 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio24/direction
sudo chmod 777 /sys/class/gpio/gpio24/value
# GPIO 23 as Squelch to RX1
echo 23 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio23/direction
sudo chmod 777 /sys/class/gpio/gpio23/value
#end of GPIO Section
#Remove # at start of next line for permanent reboot on power loss.
#sudo svxlink –daemon –logfile=/var/log/svxlink.log
And if you are running Darkice then this following line is essential.
sudo /usr/bin/darkice -c /etc/darkice.cfg
These lines go immediately before the final
exit 0
Save and exit the file.