JamesP6000 / WsprryPi

Raspberry Pi WSPR transmitter using NTP based frequency calibration
Other
326 stars 66 forks source link

PTT when transmiting #25

Open lu7did opened 5 years ago

lu7did commented 5 years ago

Hello,

Excellent program, running it on a continuous basis together with the also excellent QRPi board.

I would like to suggest the possibility of some (perhaps selectable) GPIO line to be raised when a transmission starts and lowered otherwise (or viceversa) so it can be use to PTT another stage.

In particular the posibility to switch antennas if We're also receiving in the same antenna.

Thank you, Pedro LU7DID

xt250 commented 4 years ago

I use this code for PTT on pin 26 | 25 | GPIO.25 - so I can receive during the idle time

4 files are need

/home/pi/gpio/tx /home/pi/gpio/rx /home/pi/wspr137500 /home/pi/sked1

put the following in a script named /home/pi/gpio/rx

gpio mode 25 out

gpio write 25 1

echo RX


put the following in a script named /home/pi/gpio/tx

gpio mode 25 out

gpio write 25 0

echo TX


put the following in a script named /home/pi/wspr137500 /home/pi/gpio/tx sudo WsprryPi/wspr -f -p 0 callsign grid 23 137500 /home/pi/gpio/rx


put the following in a script named /home/pi/sked1 and execute ./sked1

while : do

m=date +%M s=date +%S echo -n -e $m $s "\r"

if [ "$m" = "59" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "01" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "03" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "05" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "07" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "09" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "11" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "13" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "15" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "17" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "19" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "21" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "23" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "25" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "27" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "29" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "31" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "33" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "35" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "37" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "29" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "31" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "33" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "35" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "37" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "39" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "41" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "43" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "45" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "47" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "49" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "51" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "53" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "55" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

if [ "$m" = "57" ] && [ "$s" = "58" ]; then /home/pi/wspr137500 fi

done