module • How to use the Python picamera module to control the camera • How to use the GPIO Zero Button interface to control the camera • How to use loops to repeat commands • How simple changes to code make different projects • Ideas for camera projects
import Button from time import sleep button = Button(17) with PiCamera() as camera: camera.start_preview() button.wait_for_press() sleep(3) camera.capture("/home/pi/image2.jpg") camera.stop_preview() Save and run: Ctrl + S F5