Connecting Camera Module To RPi

, , Leave a comment

Camera Module for Raspberry Pi was launched quite a while back but I have recently got it from element14. It has a 5MP sensor and is capable of clicking 1080p videos @30fps and 720p videos @60fps. But here’s the catch. The setup may seem a bit complicated in the beginning but it is damn simple.


The camera module comes in an anti static cover. Make sure you ground yourself or use an anti-static band to avoid damage to the camera module. The camera lens is covered with a blue color scratch guard. The module has a good length too.

Packaging Camera Module RPi

Packaging Camera Module RPi


  1. The camera module will be connected to the port right behind the ethernet port. Find the port on the Raspberry Pi and apply small pressure to pull the locking lever.
  2. Now place the camera module in the socket. Once done, push the locking lever down.
  3. Once all connections are done, the Raspberry Pi will look something like this. Make sure the Raspberry Pi is connected to the internet.
  4. Final Connections RPi

    Final Connections RPi

  5. Next open LXTerminal and type the following commands. Instead of using LXTerminal, you can also SSH your RPi. I will SSH my Pi.
  6. sudo apt-get update && sudo apt-get upgrade
    Update & Upgrade RPi

    Update & Upgrade RPi

    These commands will download the latest packages and upgrade the old ones with new ones. This command may take around 7 minutes.

  7. Once this is done type sudo raspi-config
  8. RPi Configuration Tool

    RPi Configuration Tool

  9. Then scroll down to Enable Camera. Select Enable. Then select Finish and select Yes to reboot the Raspberry Pi.
  10. Once the Raspberry Pi reboots, open LXTerminal and type raspistill. You will get list of all commands that can be used with this command. This command is used to click photos. So to click a photo type raspistill -o image.jpg -t 5000. This will set a timer of 5 seconds and then a photo will be clicked. Photos are stored in home folder.
  11. Image Command RPi

    Image Command RPi

    Image Command RPi With Timer

    Image Command RPi With Timer

  12. For video we will type raspivid. You will get list of all commands that can be used with this command. This command is used to click videos. So to click a video type raspivid -o video.h264 -t 10000. This will click a video for 10 seconds. The video is stored in home folder.
  13. Video Command RPi

    Video Command RPi

    Video Command RPi With Output

    Video Command RPi With Output

  14. To play it type omxplayer filename
  15. Play H.264 Video RPi

    Play H.264 Video RPi

  16. To store image and video in other location, specify location before image and video name.
  17. Home Folder RPi

    Home Folder RPi

A number of steps have to be followed but once you know the command, its very simple to click photos and videos using the Camera Module for RPi.


Leave a Reply

You must be login to post a comment. Log in now