Skip to content

Instantly share code, notes, and snippets.

@chefblogger
Last active February 6, 2021 12:13
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 chefblogger/a10291cde14a31c043d74326ec23567d to your computer and use it in GitHub Desktop.
Save chefblogger/a10291cde14a31c043d74326ec23567d to your computer and use it in GitHub Desktop.
Raspberry Pi: Macht alle x Sekunden ein Bild und speichert es ab
from picamera import PiCamera
from time import sleep
camera = PiCamera()
bilder_nummer = 0
while True:
sleep(20) # bild wird alle 20 sekunden gemacht
bilder_name = 'bild{0:05d}.jpg' .format(bilder_nummer) #die bilder heissen bilder00001.jpg
camera.capture(bilder_name)
bilder_nummer +=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment