Skip to content

Instantly share code, notes, and snippets.

@benhosmer benhosmer/
Last active Dec 17, 2015

What would you like to do?
Raspberry pi camera module time-delayed loop.
#!/usr/bin/env python
import datetime
from time import sleep
import subprocess
fps = 1 # The number of frames to capture per second.
total_dur = 10 # The total capture time.
The settings above capture 1 frame every second and runs
for a total of 10 seconds. Afterwards you'll have 10 images
captured 1 second apart from each other
for x in range(total_dur):
current_time = str(
file_name = current_time.replace(' ', '_') + '.jpg'['raspistill', '-o', file_name, '-n'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.