{"id":81,"date":"2013-08-01T14:29:17","date_gmt":"2013-08-01T14:29:17","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/pi\/?page_id=81"},"modified":"2013-08-23T15:37:28","modified_gmt":"2013-08-23T15:37:28","slug":"raspberry-pi-camera-board","status":"publish","type":"page","link":"https:\/\/blog.soton.ac.uk\/pi\/modules-available\/raspberry-pi-camera-board\/","title":{"rendered":"Raspberry Pi Camera Board"},"content":{"rendered":"<p>Firstly, follow this short video on how to attach the Camera Board onto the Raspberry Pi: <a href=\"https:\/\/www.youtube.com\/watch?v=GImeVqHQzsE\" target=\"_blank\">https:\/\/www.youtube.com\/watch?v=GImeVqHQzsE<\/a>. Please note that the camera can be damaged by static electricity. Before removing the camera from its grey anti-static bag, please make sure you have discharged yourself by touching an earthed object (e.g. a radiator or water tap). The camera may come with a small piece of translucent blue plastic film covering the lens. This is only present to protect the lens while it is being mailed to you, and needs to be removed by gently peeling it off.<\/p>\n<p><strong>How to enable camera support<br \/>\n<\/strong><\/p>\n<p dir=\"ltr\">Run the following commands in a terminal to upgrade the Raspberry Pi firmware to the latest version:<\/p>\n<p dir=\"ltr\"><strong>sudo apt-get update<\/strong><\/p>\n<p><a href=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image1.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" alt=\"\" src=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image1.jpg\" width=\"1184\" height=\"624\" \/><\/a><\/p>\n<p dir=\"ltr\"><strong>sudo apt-get upgrade<\/strong><\/p>\n<p><a href=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image-1.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"image (1)\" alt=\"\" src=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image-1.jpg\" width=\"1184\" height=\"624\" \/><\/a><\/p>\n<p dir=\"ltr\">Access the configuration settings for the Pi by running the following command:<\/p>\n<p dir=\"ltr\"><strong>sudo raspi-config<\/strong><\/p>\n<p dir=\"ltr\">Navigate to \u201ccamera\u201d and select \u201cenable\u201d.<\/p>\n<p><a href=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image-2.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"image (2)\" alt=\"\" src=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image-2.jpg\" width=\"1184\" height=\"624\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image-3.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"image (3)\" alt=\"\" src=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image-3.jpg\" width=\"1184\" height=\"624\" \/><\/a><\/p>\n<p dir=\"ltr\">Select \u201cFinish\u201d and reboot.<\/p>\n<p><a href=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image-4.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"image (4)\" alt=\"\" src=\"http:\/\/www.raspberrypi.org\/wp-content\/uploads\/2013\/05\/image-4.jpg\" width=\"1184\" height=\"624\" \/><\/a><\/p>\n<p dir=\"ltr\">\n<p dir=\"ltr\"><strong>How to use the Raspberry Pi camera software<\/strong><\/p>\n<p dir=\"ltr\"><strong>raspivid<\/strong> is a command line application that allows you to capture video with the camera module, while the application <strong>raspistill<\/strong> allows you to capture images. The video and images will be captured in the current directory.<\/p>\n<p dir=\"ltr\">-o or \u2013output specifies the output filename and -t or \u2013timeout specifies the amount of time that the preview will be displayed in milliseconds. Note that this is set to 5s by default and that raspistill will capture the final frame of the preview period.<\/p>\n<p dir=\"ltr\">-d or \u2013demo runs the demo mode that will cycle through the various image effects that are available.<\/p>\n<p dir=\"ltr\"><strong>Example commands:<\/strong><\/p>\n<p dir=\"ltr\">Capture an image in jpeg format:<\/p>\n<p dir=\"ltr\"><strong>raspistill -o image.jpg<\/strong><\/p>\n<p dir=\"ltr\">Capture a 5s video in h264 format:<\/p>\n<p dir=\"ltr\"><strong>raspivid -o video.h264<\/strong><\/p>\n<p dir=\"ltr\">Capture a 10s video:<\/p>\n<p dir=\"ltr\"><strong>raspivid -o video.h264 -t 10000<\/strong><\/p>\n<p dir=\"ltr\">Capture a 10s video in demo mode:<\/p>\n<p dir=\"ltr\"><strong>raspivid -o video.h264 -t 10000 -d<\/strong><\/p>\n<p dir=\"ltr\">To see a list of possible options for running raspivid or raspistill, you can run:<\/p>\n<p dir=\"ltr\"><strong>raspivid | less<\/strong><\/p>\n<p dir=\"ltr\"><strong>raspistill | less<\/strong><\/p>\n<p dir=\"ltr\">Use the arrow keys to scroll and type q to exit.<\/p>\n<p dir=\"ltr\">\n<p dir=\"ltr\"><strong>How to stream video from the Raspberry Pi camera over a network (currently not working):<\/strong><\/p>\n<p dir=\"ltr\"><strong>To view the feed on Linux:<\/strong><\/p>\n<p dir=\"ltr\">Install the dependencies by running the following in a terminal:<\/p>\n<p dir=\"ltr\"><strong>sudo apt-get install mplayer netcat<\/strong><\/p>\n<p dir=\"ltr\">Find your IP address by running ifconfig. (Your IP address will be listed in the console output and will probably be of the form 192.168.1.XXX).<\/p>\n<p dir=\"ltr\">Run the following command in a terminal to view the feed using MPlayer:<\/p>\n<p dir=\"ltr\"><strong>nc -l -p 5001 | mplayer -fps 31 -cache 1024 &#8211;<\/strong><\/p>\n<p dir=\"ltr\"><strong>To transmit the feed from the Pi with camera module attached<\/strong><\/p>\n<p dir=\"ltr\">After setting up the \u201creceiving\u201d machine as per the instructions above, run the following commands in a terminal on the \u201ctransmitting\u201d Pi:<\/p>\n<p dir=\"ltr\">raspivid -t 999999 -o &#8211;\u00a0| nc [insert the IP address of the client] 5001<\/p>\n<p dir=\"ltr\">You can then use the commands listed in the \u201cHow to use the Raspberry Pi camera software\u201d section above to change the capture time or to add a video effect.<\/p>\n<p>http:\/\/www.raspberrypi.org\/camera<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firstly, follow this short video on how to attach the Camera Board onto the Raspberry Pi: https:\/\/www.youtube.com\/watch?v=GImeVqHQzsE. Please note that the camera can be damaged by static electricity. Before removing the camera from its grey anti-static bag, please make sure you have discharged yourself by touching an earthed object (e.g. a radiator or water tap). &hellip; <\/p>\n<p><a class=\"more-link block-button\" href=\"https:\/\/blog.soton.ac.uk\/pi\/modules-available\/raspberry-pi-camera-board\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":84718,"featured_media":0,"parent":8,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-81","page","type-page","status-publish","hentry","nodate"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/pi\/wp-json\/wp\/v2\/pages\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/pi\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/pi\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/pi\/wp-json\/wp\/v2\/users\/84718"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/pi\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":7,"href":"https:\/\/blog.soton.ac.uk\/pi\/wp-json\/wp\/v2\/pages\/81\/revisions"}],"predecessor-version":[{"id":85,"href":"https:\/\/blog.soton.ac.uk\/pi\/wp-json\/wp\/v2\/pages\/81\/revisions\/85"}],"up":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/pi\/wp-json\/wp\/v2\/pages\/8"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/pi\/wp-json\/wp\/v2\/media?parent=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}