Created
April 6, 2017 19:20
-
-
Save AO8/c7fa73648318b7cfc8169bb7f3713537 to your computer and use it in GitHub Desktop.
Timelapse photo with timestamp Python script for Raspberry Pi
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
from picamera import PiCamera, Color | |
from time import sleep | |
import datetime as dt | |
camera = PiCamera() | |
# 8 hour timeplase with image taken every 10 seconds | |
for i in range(2880): | |
camera.annotate_background = Color("black") | |
camera.annotate_text = dt.datetime.now().strftime("PiLapse %m-%d-%Y %H:%M:%S") | |
camera.capture("/home/pi/img{0:04d}.jpg".format(i)) | |
sleep(10) | |
camera.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment