Complete the code to import the Raspberry Pi camera module library.
from picamera import [1]
The correct class to control the Raspberry Pi camera is PiCamera.
Complete the code to create a camera object.
camera = [1]()You create a camera object by calling PiCamera().
Fix the error in the code to capture an image and save it as 'image.jpg'.
camera.capture([1])The filename must be a string with the desired image name and extension. Here, 'image.jpg' is correct.
Fill both blanks to set the camera resolution to 1024x768.
camera.resolution = ([1], [2])
The resolution is set as a tuple of width and height. Here, width is 1024 and height is 768.
Fill all three blanks to start the camera preview, wait 5 seconds, then stop the preview.
camera.[1]() time.sleep([2]) camera.[3]()
You start the preview with start_preview(), wait 5 seconds using time.sleep(5), then stop the preview with stop_preview().
