So, after a  long time of exams and revision, here is the much awaited camera module tutorial! 

  1. Purchase your camera module. These can be found at:  http://uk.farnell.com/raspberry-pi/rpi-camera-board/raspberry-pi-camera-board-5mp/dp/2302279?CMP=KNC-GUK-FUK-GEN-KWL# or http://uk.rs-online.com/web/p/video-modules/7757731/.
  2. Once your camera has arrived, take the camera out of the anti-static bag, but make sure that you 'earth' yourself first, by touching something such as a radiator, or a computer casing. This prevents the module from being damaged by any static electricity.
  3. Insert the ribbon cable attached to the Pi into the socket between the ethernet and HDMI ports, making sure that the shiny connectors are facing towards the HDMI socket.
  4. Make sure that you firmly hold the cable in place, by pulling up the piece of black plastic, inserting the cable, then pressing the plastic back town again. The cable should fit in a snug manner, like the photo.
  5. On your Pi running Wheezy, type sudo apt-get update. 
  6. Type sudo apt-get upgrade
  7. From the menu drop-down list in the top-left corner of the screen, select 'Preferences' and then 'Raspberry Pi Configuration'
  8. In the new window, select the 'Interfaces' tab, and ensure that the 'Camera' setting is enabled. 
  9. Click OK, then allow the Pi to reboot if you had to change the settings.
  10. When the Pi has rebooted, open up LXTerminal.
  11. If you wish to take a still image, type in raspistill  -o *****.jpeg Replace the stars with the required name for the image. 
  12. When you press enter, you will be given a short preview before the picture is taken.
  13. The image will be saved in the home directory (Pi, unless you have changed the user).
  14. To record a video, type raspivid -o *****.h264 -t 10000 Again, replace the stars with the preferred video name. In this example, the number (10000) is the time (in milliseconds) that you want the video to last for.
  15. When enter is pressed, the video will start recording immediately.
  16. Again, the film will be saved in the home directory.

I would like to say a great big thank you to the Raspberry Pi foundation who very kindly donated a Camera Module to me, to use in my tutorial. Thanks :)

 

 

 So, lots of people have asked me about viewing the videos, recorded by the Raspberry Pi Camera. As you could tell, the video was saved in the .h264 format. This is very hard to view on the Pi, without installing a brand news operating system like XBMC, so you need to convert the files into a viewable format, like mp4! Follow this tutorial to find out how to download a program to convert and view these videos.


  1. Omxplayer (the program needed to view the mp4 videos you will create) is installed on the latest version of Raspbian Wheezy, so you may already have it installed. If not you can install it by typing this into LXTerminal: sudo apt-get -y install omxplayer. (The -y means that you will not have to press 'y' to confirm the installation, like instructed on this page.
  2. To view this new video, type this: omxplayer ****.h264 This will play the video through the composite output on the Pi (the yellow one!) Again, replace the stars with the name of the h264 video you created in step 4. 
  3. If you want to watch the video on a HDMI Screen, instead type: omxplayer -o hdmi ****.h264