Skip to content

Instantly share code, notes, and snippets.

@squirelo
Created October 1, 2013 16:15
Show Gist options
  • Save squirelo/6781013 to your computer and use it in GitHub Desktop.
Save squirelo/6781013 to your computer and use it in GitHub Desktop.
import os
import datetime
import time
# Remplace touch par ton programme
photo_cmd = "raspistill -t 0 -vs -ex auto -awb sun -o"
photo2_cmd = "raspistill -t 1000 -vs -ex auto -o"
video_cmd = "raspivid -t 10000 -vs -ex auto -awb sun -o"
video2_cmd = "raspivid -t 10000 -vs -ex auto -o"
upstagram_cmd = "sudo python /home/pi/upstagram3.py"
upstagram2_cmd = "sudo python /home/pi/upstagram3.py"
upstagram3_cmd = "sudo python /home/pi/upstagram3.py"
fmt = "%Y-%m-%d-%H-%M-%S"
while True:
for i in range(0, 4):
now = datetime.datetime.now()
filename = now.strftime(fmt) + "-" + str(i)
os.system(photo_cmd + " " + filename + ".jpg")
os.system(photo2_cmd + " " + filename + ".jpg")
os.system(photo_cmd + " " + filename + ".jpg")
os.system(photo2_cmd + " " + filename + ".jpg")
os.system(photo_cmd + " " + filename + ".jpg")
os.system(video_cmd + " " + filename + ".h264")
os.system(video2_cmd + " " + filename + ".h264")
os.system(upstagram_cmd)
os.system(photo_cmd + " " + filename + ".jpg")
os.system(photo2_cmd + " " + filename + ".jpg")
os.system(photo_cmd + " " + filename + ".jpg")
os.system(photo2_cmd + " " + filename + ".jpg")
os.system(photo_cmd + " " + filename + ".jpg")
os.system(video_cmd + " " + filename + ".h264")
os.system(video2_cmd + " " + filename + ".h264")
os.system(upstagram3_cmd)
os.system(photo_cmd + " " + filename + ".jpg")
os.system(photo2_cmd + " " + filename + ".jpg")
os.system(photo_cmd + " " + filename + ".jpg")
os.system(photo2_cmd + " " + filename + ".jpg")
os.system(photo_cmd + " " + filename + ".jpg")
os.system(video_cmd + " " + filename + ".h264")
os.system(video2_cmd + " " + filename + ".h264")
os.system(upstagram2_cmd)
print "Sleeping 4 seconds"
time.sleep(4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment