Components Required:
- Raspberry Pi 3 B+
- SD Card
- Micro USB Cable with Adapter
- Monitor with HDMI cable
- Mouse and Keyboard
- Raspberry Pi Camera
Step 1: Connect Camera to Raspberry PI

Remove the protective covering from camera lens. Insert the cable in the camera port (the contact side should face HDMI interface)

Step 2: Enable Camera Interface and reboot
1. Open terminal and type the command raspi-config
2. Select Interfacing options
3. Select Camera
4. Select Finish and it will ask to reboot now. Select yes.

Step 3: Capture an image
Once the camera is enabled, we are ready to capture an image.
To capture a still image open terminal and type the command
raspistill –t 2000 -o image.jpg

Here “raspistill” is a command that captures an image, the parameter “-o” specifies the filename of image.
Step 4: Record a video
To record a video open terminal and type the command
raspivid -o video.h264 -t 10000
Here raspivid is a command that records a video, the parameter “-o” specifies the filename of video and the parameter “-t” specifies the duration of video (in milliseconds).
For example, this command will record a 10 second video and save it as video.h264.
Author: Nakul Garg