Update rpitx.py

pull/120/head
alanbjohnston 5 years ago committed by GitHub
parent 7b42cc9e78
commit 067aab822f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,7 +5,7 @@ import subprocess
import time import time
import os import os
import sys import sys
from picamera import PiCamera # from picamera import PiCamera
GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False) GPIO.setwarnings(False)
@ -62,14 +62,18 @@ if __name__ == "__main__":
# os.system("(while true; do (sleep 5 && cat /home/pi/CubeSatSim/wav/sstv.wav); done) | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3") # os.system("(while true; do (sleep 5 && cat /home/pi/CubeSatSim/wav/sstv.wav); done) | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3")
os.system("(while true; do (sleep 5 && cat /home/pi/CubeSatSim/wav/sstv.wav); done) | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3 &") os.system("(while true; do (sleep 5 && cat /home/pi/CubeSatSim/wav/sstv.wav); done) | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3 &")
while True: while True:
try: os.system("raspistill -o ~/camera_out.jpg -w 640 -h 496 > /dev/null 2>&1")
camera = PiCamera() os.system("python3 -m pysstv --mode PD120 ~/camera_out.jpg sstv_camera.wav > /dev/null 2>&1")
camera.resolution = (640, 496) os.system("cat sstv_camera.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3 > /dev/null 2>&1")
camera.start_preview()
# try:
# camera = PiCamera()
# camera.resolution = (640, 496)
# camera.start_preview()
# Camera warm-up time # Camera warm-up time
time.sleep(2) # time.sleep(2)
camera.capture('sstv_image.jpg') # camera.capture('sstv_image.jpg')
finally: # finally:
GPIO.output(txLed, txLedOn); GPIO.output(txLed, txLedOn);
# GPIO.output(27, 0); # GPIO.output(27, 0);
print("Sleeping") print("Sleeping")

Loading…
Cancel
Save

Powered by TurnKey Linux.