Update rpitx.py store camera image in payload directory with timestamp

beta-hab
Alan Johnston 2 years ago committed by GitHub
parent 9ca49d0b72
commit eb496e926e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,7 +3,7 @@
import RPi.GPIO as GPIO import RPi.GPIO as GPIO
from RPi.GPIO import output from RPi.GPIO import output
#import subprocess #import subprocess
#import time import time
from time import sleep from time import sleep
#import os #import os
import sys import sys
@ -582,7 +582,9 @@ if __name__ == "__main__":
system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1") system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1")
print("Photo taken") print("Photo taken")
current_time = time.strftime("%m-%d-%H%M%S", time.localtime())
system("raspistill -o " + "/home/pi/payload/img"+current_time+".jpg")
file='/home/pi/CubeSatSim/camera_out.jpg' file='/home/pi/CubeSatSim/camera_out.jpg'
font1 = ImageFont.truetype('DejaVuSerif.ttf', 20) font1 = ImageFont.truetype('DejaVuSerif.ttf', 20)
font2 = ImageFont.truetype('DejaVuSerif-Bold.ttf', 16) font2 = ImageFont.truetype('DejaVuSerif-Bold.ttf', 16)

Loading…
Cancel
Save

Powered by TurnKey Linux.