Installing the Raspberry Pi Camera Board

Raspberry Pi Camera Board Installation Guide

Custom designed and manufactured by the Raspberry Pi Foundation in the UK, the Raspberry Pi Camera Board features a 5MP (2592×1944 pixels) Omnivision 5647 sensor in a fixed focus module. The module attaches to Raspberry Pi, by way of a 15 Pin Ribbon Cable, to the dedicated 15-pin MIPI Camera Serial Interface (CSI), which was designed especially for interfacing to cameras. The CSI bus is capable of extremely high data rates, and it exclusively carries pixel data to the BCM2835 processor!

This step by step installation guide will show you how to install, set up and use that shiney little camera board on your Raspberry Pi!

Part 1 - Installation

Before you do anything, you need to enable support for the camera module on Raspian. So the very first step is to install and update Raspian on your Raspberry Pi.


Make sure you have the latest Raspbian Operating System (OS) installed on your Raspberry Pi. You can download the latest version here:

There's an installation guide on how to load the Raspberry Pi OS onto an SD card here.


Once installed, we'll then need to make sure we've got the latest firmware drivers by running the following commands (make sure you've got an internet connection - this won't work without!):

Sudo apt-get update

(This updates the list of available packages and their versions, but it does not install or upgrade any packages.)

Sudo apt-get upgrade

(This actually installs newer versions of the packages you have. After updating the lists, the package manager knows about available updates for the software you have installed.)

Sudo apt-get autoremove

(This will then remove all of the reduntant packages after the latest upgrade)


Now we're all updated we need to enable the camera module:

Sudo raspi-config

(This opens the Raspberry Pi configuration menu)


Then, simply navigate to "Camera"

Select "Enable"

Then select "Finish" and say "Yes" to reboot.

That's it, we're ready to add our board and start taking pictures!

Part 2 - Plugging it in!

For info. on how to plug the board in, simply watch the following short video from James Adams at the Raspberry Pi Foundation. Make sure your Raspberry Pi's switched off, and make sure to ground yourself beforehand by touching something metal (the Raspberry Pi camera board is sensitive to static).


Part 3 - How to Take Pictures and Videos using the Raspberry Pi Camera Board!

Awesome! So we're installed and plugged in, let's take some pictures and videos!

The default save folder for images is "/home/pi" so if your just having a play, it's easiest to boot up the GUI with startx, open the "File Manager" (to view outputted files as they're taken) and use "LXTerminal" for the camera commands. 


There are two 'main' commands you'll need to use the Raspberry Pi Camera board to take pictures and video. From the command line . . . 

The following command allows you to take still pictures:


The following command allows you to take video


Both also have a large set of subcommands that will allow you to change the input and output variables of the picture (e.g. name, format, delay period, video length, effects etc.). If you want the Raspberry Pi to list these commands, simply write the main command only. Section C. below outlines the available subcommands. 


If you want the camera to actually take a picture you'll need a few basic subcommands as follows, these need to be inputted after the main command, with a space in between:

-o or -output (specifies the output file name and format)

-t or -timeout (specifies the amount of time that the preview will be displayed in milliseconds (ms). This is set to 5 seconds (5000ms) by default, and the raspistill will capture the final frame of that 5 second period.

Example 1.

I want to take a picture of my cat. The following command would capture an image in jpeg format, with a 10 second preview time before the kitty gets snapped:

raspistill -o cat.jpg -t 10000

(In this example we use "-o cat.jpg" to specify we want the file called cat and for it to be a .jpg type. We use "-t 10000" to set the preview time to 10 seconds - the actual picture will be taken at the very end of the 10 seconds)

Example 2.

I want to take a video of my dog dancing. The following command would take a 15 seconds video in h264 format. 

raspivid -o dog.h264 -t 15000

(In this example we use "-o dog.h264" to specify we want the file called dog and for it to be in h264 format. We use "-t 15000" to specify that we want the video to be 15 seconds long)


There's a huge range of subcommands available and a full list is available on the on the ModMyPi Website:

RaspiStill Command List

RaspiVid Command List

The detailed command documentation can be downloaded here:

Detailed Camera Command Documentation

As with most Raspberry Pi bits, the best way to learn is to play!