Camera board available for sale!

The camera boards are now available for order! You can buy one from RS Components or from Premier Farnell/Element14. We’ve been very grateful for your patience as we’ve tweaked and refined things; it’d have been good to get the camera board out to you last month, but we wanted your experience to be as good as possible, and we’ve been working on the software right up until last night. Thank you to Gordon and Rob at Raspberry Pi and to Dom Cobley for their work on the firmware (Rob also worked on the documentation); to JamesH for his work on the software; to the Broadcom Cambridge ISP team, particularly David Plowman and Naush Patuck, for volunteering to help with tuning; to Bruce Gentles at Broadcom for his volunteering to help with some of the initial bring-up; to James Adams at Raspberry Pi for running the hardware project, and everybody at Sony Pencoed for making it happen.

Tehzeeb Gunza at OmniVision coordinated things from their end, and helped us with sensor selection. Thanks also to Gert van Loo and Rob Gwynne for their work on the hardware design. (And thank you to Broadcom for letting us take advantage of your team’s willingness to volunteer for us!) This, for the curious, is the camera lab we’ve been borrowing from Broadcom for testing. The mannequin’s name is Veronica. She’s lousy company. The room gives us a calibrated and fixed target to use during tuning; it’s designed to be filled with examples of the sorts of things people tend to take pictures of. Which makes it a kind of creepy place to hang out. Between this and anechoic chambers, we’re getting the full range of testing chambers that give us the shivers.

Click to enlarge. You might be interested to learn that this was snapped with a Nokia N8, which uses an earlier version of the imaging core that’s in the Raspberry Pi (but a different sensor and optics).

For such a small device, this has been an enormous project, and a year-long effort for everybody involved. We’re pretty proud of it: we hope you like it!

How to set up the camera hardware

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 flex cable inserts into the connector situated between the Ethernet and HDMI ports, with the silver connectors facing the HDMI port. The flex cable connector should be opened by pulling the tabs on the top of the connector upwards then towards the Ethernet port. The flex cable should be inserted firmly into the connector, with care taken not to bend the flex at too acute an angle. The top part of the connector should then be pushed towards the HDMI connector and down, while the flex cable is held in place. (Please view the video above to watch the cable being inserted.)

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.

How to enable camera support in Raspbian

Boot up the Pi and log in. The default username is pi, and the default password is raspberry. (Note: if you have changed these from the default then you will need to supply your own user/password details).

Run the following commands in a terminal to upgrade the Raspberry Pi firmware to the latest version:

sudo apt-get update

Click to enlarge

sudo apt-get upgrade

Click to enlarge

Access the configuration settings for the Pi by running the following command:

sudo raspi-config

Navigate to “camera” and select “enable”.

Click to enlarge

Click to enlarge

Select “Finish” and reboot.

Click to enlarge

How to use the Raspberry Pi camera software

raspivid is a command line application that allows you to capture video with the camera module, while the application raspistill allows you to capture images.

-o or –output specifies the output filename and -t or –timeout specifies the amount of time that the preview will be displayed in milliseconds. Note that this set to 5s by default and that raspistill will capture the final frame of the preview period.

-d or –demo runs the demo mode that will cycle through the various image effects that are available.

Example commands

Capture an image in jpeg format:

raspistill -o image.jpg

Capture a 5s video in h264 format:

raspivid -o video.h264

Capture a 10s video:

raspivid -o video.h264 -t 10000

Capture a 10s video in demo mode:

raspivid -o video.h264 -t 10000 -d

To see a list of possible options for running raspivid or raspistill, you can run:

raspivid | less

raspistill | less

Use the arrow keys to scroll and type q to exit.

Extended documentation is available.

Note that we recommend that you change SSH password if you are using a camera, in order to prevent unwanted access.

How to stream video from the Raspberry Pi camera over a network

To view the feed on Linux

Install the dependencies by running the following in a terminal:

sudo apt-get install mplayer netcat

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).

Run the following command in a terminal to view the feed using MPlayer:

nc -l -p 5001 | mplayer -fps 31 -cache 1024 -

To view the feed on Windows

Install and run Linux instead.

Find your IP address by running ipconfig. (Your IP address will be listed in the console output and will probably be of the form 192.168.1.XXX).

Download MPlayer.

Download Netcat.

Note that your browser may complain that these files are malicious, as they are unsigned executables.

Press the Windows key and the ‘r’ key simultaneously to bring up the “Run” dialog. Enter cmd.exe into the dialog and press enter/return to open a DOS prompt.

Enter the following command at the prompt to view the feed using MPlayer:

[Path to nc.exe]\nc.exe -L -p 5001 | [Path to mplayer.exe]\mplayer.exe -fps 31 -cache 1024 -

To view the feed on OS X

Download MPlayer.

Alternatively, you can download mplayer using Brew, which we recommend.

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).

Run the following command in Terminal to view the feed using MPlayer:

nc -l -p 5001 | mplayer -fps 31 -cache 1024 -

To view the feed on a Raspberry Pi:

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).

Run the following commands in a terminal on the receiving Pi:

mkfifo buffer

nc -p 5001 -l > buffer | /opt/vc/src/hello_pi/hello_video/hello_video.bin buffer

To transmit the feed from the Pi with camera module attached

After setting up the “receiving” machine as per the instructions above, run the following commands in a terminal on the “transmitting” Pi:

raspivid -t 999999 -o – | nc [insert the IP address of the client] 5001

You can then use the commands listed in the “How to use the Raspberry Pi camera software” section above to change the capture time or to add a video effect.

How to submit bug reports or see the source code

You can see the source code and submit bug reports for raspivid and raspicam here.


Wednesday grab bag

Eben and I are travelling to Edinburgh today for the Turing Festival, a technology festival that runs at the same time as the Edinburgh Festival. Eben’s giving a talk on education and technology on Saturday; we’re very excited to be at the same event as Steve Wozniak, and hope to be eating many square sausages and black puddings.

So we’ll be rather absent from the internet today, because Edinburgh’s a long way away from Cambridge. Here are some bits and pieces to keep you occupied.

Maplin bundle

Maplin Raspberry Pi bundle

Maplin Raspberry Pi bundle. Click image to pre-order.

Maplin, the UK electronics company, are selling a Raspberry Pi bundle, which includes a Raspberry Pi and all the peripherals you might need to get started, from September. You can pre-order now if you want to get ahead of the crowd (orders are first-come, first-served), and they’ll arrive in stores next month. We think the kit will make a great Christmas present, especially if you know any young people who might have trouble rustling up things like wi-fi dongles and USB hubs on their own. For £69 you’ll get a Raspberry Pi, keyboard and mouse, an SD card pre-loaded with Raspbian, a powered USB hub, HDMI and USB cables, a power supply and a wi-fi dongle.

Super Turkey

Seven-year-old Philip, whom you may remember from last week, has spent another week programming in Scratch with his Raspberry Pi and has another game to show us. Dad tells me that Philip’s plush parrot, who features heavily in this video, doesn’t have a name yet: please leave suggestions in the comments!

We can’t get enough of videos and pictures like this at the Foundation. If you’re a proud parent with a Raspberry Pi-wielding kid, or if you’re a kid yourself, and you’ve got video or pictures you’d like us to share on this website, please mail me at liz@raspberrypi.org – we really like to remind ourselves and everybody else that this sort of thing is what the Raspberry Pi project is all about.

And some grown-ups have been working on stuff too…

You may have already read about Dave Hunt’s DSLR hack – it went viral last week. He’s embedded a Raspberry Pi in a camera battery grip, which allows him to wirelessly tether his camera to…well, whatever he’s got on his network. He’s been automatically pushing pictures to other devices, controlling the camera with networked objects (a smartphone, a PC), making it respond to a remote trigger, auto-saving pictures to a USB drive – the Raspberry Pi also works as an intervalometer, and he can use it to program aperture and exposure settings. He’s got big ideas for further development, too, with plans for an additional screen and an internal power supply. Here’s a video of the camera sending images to an iPad, with some example Perl script.

Off-the-shelf DSLR cameras with these kinds of functions typically run into the many thousands of pounds. Dave’s done it all with a $35 Raspberry Pi. More power to your thrifty, imaginative elbow, Dave.

And have you come across Nixie clocks? These cold-cathode tube clocks have been a bit of a web fetish for a little while now, but this one, from Martin Oldfield, is the first one I’ve seen being driven by a Raspberry Pi. I’m going to hack one of these together myself when I get some time; it’s a lovely looking thing, and putting one together at home is simpler than you’d think.

Nixie clock

Meanwhile, in Germany, a Cherry G80-3000 keyboard (one of those fabulous mechanical keyboards with a lovely clicky action, like my now-deceased IBM Model M but from this decade) has been hacked to contain a Raspberry Pi, hidden in some space under the function keys – a whole computer in a keyboard. I feel like we’ve seen this kind of thing before.

Raspcherry Pi

Please spread this Jam

The Raspberry Jams continue around the world – Milton Keynes, Bristol and Melbourne, Australia (which happened very shortly before I wrote this post on Tuesday night, so I don’t have any bloggy links about it yet), have seen Jams in the last few days. These events are a great way to meet other Raspberry Pi users, get a start if you’re a kid or just a grown-up who wants to learn about programming and electronics, and to show off your projects.

Raspberry Pi and something much bigger

Raspberry Pi and something much bigger. (It's an evaluation board from Heber, who sponsored the Bristol Raspberry Jam.)

Our good friend Alan “Teknoteacher” Donohoe, who does a phenomenal amount of work organising and promoting the Jams, maintains a page describing where and when all the Jams across the world are being held. We’re seeing venues as small as local cafes and venues as large as university auditoriums being used for groups of all sizes, and people aged from 14 to 70 setting the events up. The list is growing all the time; if there isn’t one near you yet, why not set one up yourself?

 


The Dark Pi Rises

I’m getting a real kick out of some of the fan movies that have been appearing on YouTube. Algorhythmic from Aon² has been featured here before with his robot arm. Now he’s got a night-vision robot that wants to be Christian Bale. Is there anything you guys can’t do?