Python Forum

Full Version: Help with taking pictures on raspberry pi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to automatically take a picture on a raspberry pi camera every 60 seconds. I am struggling to repeat the loop. Any help would be great thanks!

Current code:
from picamera import PiCamera
from time import sleep
import time
import os
import sys
from datetime import datetime

camera = PiCamera()

camera.start_preview()
for I in range(1):
	sleep(60)

camera.capture(‘/home/pi/Desktop/images.jpg’ % i)
use a while loop around the code that you want to repeat.