Install the Camera Drivers

The latest version of Raspbian includes all the camera drivers. If you don’t run the latest version, you’ll have to update your software stack. Issue the following commands:

 
$ ​sudo apt-get update
 
$ ​sudo apt-get upgrade -y
 
$ ​sudo apt-get install git-core -y
 
$ ​sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
 
$ ​sudo chmod +x /usr/bin/rpi-update
 
$ ​sudo rpi-update

These commands install the latest firmware and camera drivers for your Pi. Also, you have to run raspi-config to enable the camera (see Enable the Pi Camera) and set the GPU memory to 128MB (see Adjust the Pi’s Memory Layout).

In addition to the drivers, you get a few useful command-line tools for taking photos and videos. In the ...

Get Raspberry Pi, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.