Update rpitx.py added program radio

beta-v1.3.1-freq-p
Alan Johnston 2 years ago committed by GitHub
parent ecb01928c8
commit 4a518700c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,6 +9,7 @@ from time import sleep
import sys import sys
from os import system from os import system
from PIL import Image, ImageDraw, ImageFont, ImageColor from PIL import Image, ImageDraw, ImageFont, ImageColor
import serial
def increment_mode(): def increment_mode():
print("increment mode") print("increment mode")
@ -285,6 +286,19 @@ if __name__ == "__main__":
print(callsign) print(callsign)
GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4
GPIO.setup(txLed, GPIO.OUT) GPIO.setup(txLed, GPIO.OUT)
print("Programming FM module!\n");
output(pd, 1)
output (ptt, 1)
ser = serial.Serial("/dev/ttyAMA0", 9600)
print(ser.portstr)
for i in range(6):
ser.write("AT+DMOSETGROUP=0,435.0000,434.9100,0,3,0,0\r\n")
sleep(0.1)
ser.close()
output(pd, 0)
sleep(10) # delay so cubesatsim code catches up sleep(10) # delay so cubesatsim code catches up

Loading…
Cancel
Save

Powered by TurnKey Linux.