Hardware Reference
In-Depth Information
A longer cable to the camera is a possibility, although it will introduce more noise,
which is a problem since we're hoping for a reasonably realistic look (at least from a
distance). Several vendors sell kits to extend (or 1:1 replace) the camera's 15-core, 1
mm pitch ribbon cable:
• BitWizard B.V. says that it has successfully extended the cable to 4 meters (~13
feet) with an extension kit that contains both straight and right-angle connectors,
which also could be useful depending on the way you need to place parts in your
costume. The ribbon cable does not come with the kit, but the company sells it
separately for €0.15/10 cm.
ModMyPi and Toby Electronics sell direct replacement mm cables (15-way flat flex
cables). The ModMyPi one is 150 mm; the Toby one (type number FFC1-15-
B-150-10-5-160MM) is 160 mm.
• The Pi Hut sells replacement ribbon cables from 50-300 mm, but only through
its eBay storefront (the_pi_hut), not through its usual website.
To replace the ribbon cable, pull the black connector out of the camera module by the
corners, but just a bit—not all the way off. Then you can slide the flat ribbon out.
A Simple Script
The software to power the camera is the raspivid utility, provided as part of Raspbian
(or downloaded and installed along with the latest firmware in the Raspberry Pi Foun-
dation firmware repository ).
We recommend this specific invocation of raspivid :
raspivid -w 320 -h 240 -t 0 -b 5000000 -o -
This will run the camera in video mode, at a resolution of 320 x 240, with a bitrate of
5 MBits/s, forever. It won't ever save the result to a file; if you want to change that,
replace the -o - syntax with -o /path/to/filename , but be careful, since you'll over-
write that file every time this command is run. You should test this command with the
hardware connected to make sure that it works well for you (you might want to change
the resolution or bitrate, if you are using a different screen).
When you are happy with the raspivid command line, you'll want to put it into a script.
This is a very simple script, so just open up your favorite text editor (as root) and write
out these lines:
#!/bin/bash
# script to run raspivid at 320x240, 5MB/s, forever
raspivid -w 320 -h 240 -t 0 -b 5000000 -o -
Search WWH ::




Custom Search