Video 5: Exploring Accessories and Projects

This is the final video in our five-part Get Started With Pi series.

Purchase these parts to follow along with Cabe and Jenny as they explore Raspberry Pi accessories and projects.

 

Episodes in this Series:

 

Video 1: Unboxing and Setting up the Peripherals


Video 2: Exploring the Raspberry Pi


Video 3: Getting your Pi Online


Video 4: Your First Pi Project


  Exploring Accessories and Projects

 

Updating and Upgrading

Remember, it's always a good idea to keep your Raspberry Pi Operating System (in this case, Raspbian) up-to-date; especially before attaching new accessories or starting a new project.

 

sudo apt-get update

This command downloads the latest version of the OS to your Pi—it may take a while, depending on your network speed.

sudo apt-get upgrade

This command installs the upgraded code (that you just downloaded above) on to your Pi. After you press enter, it will calculate how much space will be required for the new version.  It will say something like. . .

After this operation, xxxMB of additional disk space will be used.

Do you want to continue [Y/n]?

Press Y to continue.

 

The USB Hub

 

One of the most useful accessories for your Raspberry Pi is an external USB Hub.  Remember to get one that’s powered – the Pi doesn’t have enough power to run the hub and everything you’ll plug into it.

 

 

Raspberry Pi Camera

 

The Pi accessory that has received the most attention is probably the Pi Camera, produced by the Raspberry Pi Foundation.  The Pi has a camera connector; it’s this little black item between the Ethernet port and the HDMI port.  If you press with your finger and thumb on either side of this black connector and gently pull up, you’ll open it.  It doesn’t come completely off, it just opens up.

Line up the flex cable and slide it into the connector with the contacts – the silver side – facing away from the Ethernet port.  The tricky part is getting the connector to snap closed again.  You might need to hold it down against the Ethernet port with one finger while you close the connector around it.

 

In LXTerminal, type in sudo raspi-config and press enter. You’ll see that option 5 is “Enable Camera” – using your keyboard arrow keys, scroll down to it and press enter.  You’ll be asked if you want to
Enable support for Raspberry Pi camera?
Tab to ENABLE and press enter, then select FINISH and press enter.
Then you’ll be asked to reboot – select yes and press enter.

 

Camera Commands – Still Photos

The command for taking still photos is raspistill.
To see all the command options available for raspistill, type in raspistill --help in LXTerminal.
At the very least, you’ll want to add -o filename.jpg to your command; “-o” means you’d like the Pi to save your Output file and “filename” is whatever you want to call the image file.  The camera default image file type is jpeg, or “.jpg”

raspistill -o filename.jpg – saves a file with the name filename.jpg
raspistill –t  25000 -o filename.jpg – adds a delay to the picture being taken of 25 seconds (values are entered in milliseconds).  The default delay on the Raspberry Pi camera is 5 seconds.
raspistill -o filename.jpg – saves a file with the name filename.jpg
raspistill -o filename_%d.jpg -tl 60000 -t 7200000 - The tl command is for time lapse photography.  The “%d” appended to the filename (before the “.jpg”) means that the images taken will be named sequentially: filename_1.jpg, filename_2.jpg, filename_3.jpg, etc.  The –t value (in this example, 7200000) means the time lapse will last for one hour and the -tl value (in this example, 60000) means that one image will be captured every minute.

 

Camera Commands – Videos

The Pi Camera saves videos in the .h264 format when the raspivid command is used.
To see all the command options available for raspivid, type in raspivid --help in LXTerminal.
Like raspistill, you’ll want to include the output option “-o” and a filename with the suffix .h264.

 

The time delay before video capture begins is five seconds and the default video length is 5 seconds.

 

raspivid -o video.h264 – saves a 5 second video file with the name video.h264
raspivid -o video.h264 –t 10000 – saves a 10 second video file with the name video.h264

 

Image files and videos are saved in the same directory where you ran the command (e.g. /home/pi if you haven’t changed the directory after loading LXTerminal).

 

PiFace Control and Display

 

The PiFace Control and Display adds a mini LCD screen and some input buttons on a board that connects directly to the Raspberry Pi GPIO pins.

 

 

For full set-up and configuration information, please see the User Manual.

PiFace is easy to install and configure and has a variety of applications.  See how inventor Dr. Andrew Robinson has combined 48 Raspberry Pi’s, 48 PiFace Control and Displays and 48 Raspberry Pi Cameras to capture “bullet time” effects by visiting this link.

 

Projects Featuring the Raspberry Pi

Please visit our Raspberry Pi Projects section where you can see a variety of different projects for different skill levels from Beginner to Expert.

 

 

 

Parts List

 

Product NameDescription
Buy All PartsBuy All Parts
Adafruit USB HubAdafruit USB HubBUS/Self powered 7port, 5V, 2A USB 2.0 961 HUBBuy this partBuy this part
Raspberry Pi Camera BoardRaspberry Pi Camera Board5 MP Raspberry Pi Camera BoardBuy this partBuy this part
PiFace Control & Display I/O BoardPiFace Control & Display I/O Board16x2 Alpha character display, LED display backlight, IR receiver, 3 position navigation switch, 5 tactile switches, Python libraries providedBuy this partBuy this part