Skip to content

Instantly share code, notes, and snippets.

@suadanwar
Created October 2, 2020 02:38
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 suadanwar/d0063efac962777fac6cbf32758dda8d to your computer and use it in GitHub Desktop.
Save suadanwar/d0063efac962777fac6cbf32758dda8d to your computer and use it in GitHub Desktop.
This is a sample code for Getting Started with Raspberry Pi Camera Tutorial(Take A Picture).
from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.rotation = 180
camera.start_preview()
sleep(5)
camera.capture('/home/pi/Desktop/image.jpg')
camera.stop_preview()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment