Created
March 4, 2014 10:31
-
-
Save jamosaur/9343988 to your computer and use it in GitHub Desktop.
Raspi timelapse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# Starting number. | |
fileNumber = 1 | |
while True: | |
# Set a file number (00000000) | |
fileNumberSave = "%08d" % (fileNumber) | |
imgWidth = 1280 | |
imgHeight = 720 | |
# Save file to the timelapse DIR | |
os.system("raspistill -w " + str(imgWidth) + " -h " + str(imgHeight) + " -o /timelapse/" + str(fileNumberSave) + ".jpg -sh 40 -awb auto -mm average -v") | |
# Save one to the web dir... | |
os.system("raspistill -w " + str(imgWidth) + " -h " + str(imgHeight) + " -o /var/www/cam.jpg -sh 40 -awb auto -mm average -v") | |
# add one to the file number | |
fileNumber += 1 | |
# Wait x seconds until taking another photo | |
time.sleep(10) | |
else: | |
# Do Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment