To setup the Pi camera carefully follow the steps below:
Once the Pi camera is connected power on the Pi and connect to it in a command line terminal. You will now need to enable the camera by using the raspi-config tool. After logging in to the Pi run the following command:
Once the raspi-config tool loads you will see a screen similar to the following:
Choose the Enable Camera option, then confirm the selection by choosing Enable in the dialog that appears:
Now exit the tool by selecting the Finish option from the main menu. In the dialog that appears asking to reboot select the Yes option so the Pi reboots.
After the Pi reboots log back in and test that the camera works by using the raspistill command. Run the following command:
raspistill -o cam_test.jpg
raspistill -o cam_test.jpg
You should see the red LED on the camera board light up as a photo is taken:
If you see the command fail with an error go back and carefully check you have enabled the camera using raspi-config, and that the camera cable is firmly connected to both the Pi and camera board. Sometimes the cable and connector on the camera board itself needs to be removed and reinserted to get a good connection. Also try running the rpi-update utility to update the Pi firmware and try again.
After the raspistill command successfully runs you should be able to copy the cam_test.jpg off the Pi and view it on your computer. Congrats the Pi camera is setup and ready to use!
The Pi NoIR filter camera is a special version of the Pi camera that doesn't have an infrared (IR) light filter. This means the camera can pick up infrared light that's invisible to humans. This is useful for seeing in seemingly complete darkness--if there's a source of infrared illumination, like from IR LEDs, then the Pi NoIR camera will be able to get a good image.
Here's an example of the NoIR camera image under normal lighting:
Now the same setup with almost no light at all in the room (you can only see the cat's eyes reflecting the camera's red LED!):
And finally the setup with six IR LEDs next to the camera providing illumination:
You can see the Pi NoIR camera is very handy for security cameras and other projects that need to see in the dark!
The stock Pi camera has a somewhat narrow field of view. The camera was originally designed for cell phones and similar applications so it has about a 35mm film lens equivalent field of view. Here's an example of the stock camera view with a few objects about two feet in front of the camera:
If the field of view is a too narrow you might consider putting a tiny wide-angle lens adapter in front of the Pi camera. For example this wide-angle cell phone camera adapter is an inexpensive and easy way to increase the field of view.
You'll need to mount the wide-angle lens in front of the Pi camera lens (don't try to attach it directly to the Pi camera lens!). You can 3D print an enclosure specifically designed to accomodate the wide-angle lens, or just cut a hole in a small cardboard box and build your own simple case.
With the wide-angle adapter this is how the same image setup appears:
You'll notice some distortion and vignetting at the edges which is normal for using a wide-angle adapter like this. However the field of view is noticeably larger and better able to view the surrounding room.