Created
April 3, 2017 17:40
-
-
Save Azuxul/ff1d1679edab442ef9589f87573ffa28 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
# -*-coding:Utf-8 -* | |
import time | |
from picamera import PiCamera | |
from datetime import datetime | |
"""Take picture every hour""" | |
__author__ = "Lancelot Herrbach (Azuxul)" | |
__email__ = "meow@azuxul.fr" | |
camera = PiCamera() | |
camera.resolution = (2592, 1944) | |
while True: | |
date = datetime.now() | |
timestamp = int(time.time()) | |
if date.minute == 0 and date.second == 0: | |
camera.capture("/mnt/usbkey/%s.jpg" % timestamp) | |
time.sleep(0.2) | |
quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment