Getting a picture from the Pi

The first thing we need to do, to confirm that our setup was successful, is to ask the Pi camera to take a picture for us. This will check whether all the connections are good or not. If there are problems detecting the camera, please go back and check that the cable connection is correct, that you have installed picamera, and that you have enabled the Raspberry Pi camera in raspi-config.

Reconnect to the Raspberry Pi with PuTTY, and type the following to get a picture:

pi@myrobot:~ $ raspistill -o test.jpg

raspistill takes a still image, and the -o parameter tells it to store that image in test.jpg. You can then use your SFTP client (which we set up in the headless chapter) to download this image and verify it on your computer. You will notice that the picture is upside down, due to how the camera is mounted. Don't worry—we will correct this with our software.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset