add command_tx toggled by reading squelch on blink

fm-rx
Alan Johnston 2 years ago committed by GitHub
parent c7b8e3c7dc
commit e587b0ef01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,6 +14,9 @@ print("CubeSatSim v1.3b rpitx.py starting...")
pd = 21
ptt = 20
txc = 7
squelch = 6
command_tx = True
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
@ -22,6 +25,8 @@ GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(7, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(squelch, GPIO.IN)
transmit = False
if GPIO.input(12) == False:
print("Version is v1 with UHF BPF")
@ -371,6 +376,9 @@ if __name__ == "__main__":
while 1:
output(txLed, txLedOff)
sleep(0.5)
if GPIO.input(squelch) == False:
command_tx = ~command_tx
print(command_tx)
output(txLed, txLedOn)
sleep(4.0)
else:
@ -380,6 +388,9 @@ if __name__ == "__main__":
while 1:
output(txLed, txLedOff)
sleep(0.5)
if GPIO.input(squelch) == False:
command_tx = ~command_tx
print(command_tx)
output(txLed, txLedOn)
sleep(4.0)
else:

Loading…
Cancel
Save

Powered by TurnKey Linux.