Last active
August 11, 2019 02:09
-
-
Save charlsagente/b4191581c33fb69ee6a9d8361c4409a2 to your computer and use it in GitHub Desktop.
Revisions
-
charlsagente revised this gist
Aug 11, 2019 . 1 changed file with 14 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,22 @@ # Take still pictures with Python from picamera import PiCamera from time import sleep camera = PiCamera() camera.rotation = 180 # You can rotate the image by 90, 180 or 270 degrees camera.start_preview() # Make the camera preview for i in range(5): sleep(5) # The camera should take one picture every five seconds. camera.capture('/home/pi/Desktop/image%s.jpg' % i) camera.stop_preview() # Recording video with Python camera.start_preview() camera.start_recording('/home/pi/Desktop/video.h264') sleep(5) camera.stop_recording() camera.stop_preview() -
charlsagente created this gist
Aug 11, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ from picamera import PiCamera from time import sleep camera = PiCamera() camera.rotation = 180 # You can rotate the image by 90, 180 or 270 degrees camera.start_preview() # Make the camera preview for i in range(5): sleep(5) # The camera should take one picture every five seconds. camera.capture('/home/pi/image%s.jpg' % i) camera.stop_preview()