1. Test the camera
sudo vcgencmd get_camera
# supported=1 detected=1 indicates that one camera device is found to support one
sudo raspistill -o image.jpg# Take a picture and save it as image.jpg
sudo raspivid -o video.h264 -t 1000#Taking a video 1s and save it as video.h264