Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Timelapse for the Raspberry Pi with PiCam
from time import sleep
import picamera
from fractions import Fraction
WAIT_TIME = 60
with picamera.PiCamera() as camera:
camera.framerate = Fraction(1, 6)
camera.shutter_speed = 6000000
camera.iso = 800
camera.exposure_mode = 'night'
camera.resolution = (1024, 768)
for filename in camera.capture_continuous('/home/pi/time-lapse/img{timestamp:%H-%M-%S-%f}.jpg'):
sleep(WAIT_TIME)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment