Skip to content

Instantly share code, notes, and snippets.

@frankmeeuwsen
Created February 6, 2021 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frankmeeuwsen/b7b887e93405c0624848a16291a7a150 to your computer and use it in GitHub Desktop.
Save frankmeeuwsen/b7b887e93405c0624848a16291a7a150 to your computer and use it in GitHub Desktop.
time-lapse on the pi
from time import sleep
import picamera
import picamera
from time import sleep
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