Book Image

Getting Started with Raspberry Pi Zero

By : Richard Grimmett
Book Image

Getting Started with Raspberry Pi Zero

By: Richard Grimmett

Overview of this book

Raspberry Pi Zero is half the size of Raspberry Pi A, only with twice the utility. At just three centimeters wide, it packs in every utility required for full-fledged computing tasks. This practical tutorial will help you quickly get up and running with Raspberry Pi Zero to control hardware and software and write simple programs and games. You will learn to build creative programs and exciting games with little or no programming experience. We cover all the features of Raspberry Pi Zero as you discover how to configure software and hardware, and control external devices. You will find out how to navigate your way in Raspbian, write simple Python scripts, and create simple DIY programs.
Table of Contents (16 chapters)
Getting Started with Raspberry Pi Zero
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Installing a USB camera on Raspberry Pi Zero


Having vision capability is essential to your rock, paper, or scissors robot. Fortunately, adding hardware and software for vision is both easy and inexpensive.

Connecting a USB camera is very easy. Just plug it into the USB slot. To make sure your device is connected, type lsusb. You should be able to see this:

The following screen shows a creative webcam located at Bus 001 Device 004: ID 041e:4095. To make sure that the system sees this as a video device, type ls /dev/v* and you should see something similar to the following screenshot:

The /dev/video0 is the webcam device. Now that your device is connected, let's actually see if you can capture the images and video.

Note

While many USB web cameras will work, in order to ensure this, you may want to purchase a webcam from a major webcam manufacturer like Logitech.

There are several tools that can allow you to access the webcam, but a simple program with video controls is called guvcview. To install...