Book Image

Raspberry Pi Robotic Projects - Third Edition

By : Richard Grimmett, Jon Witts
Book Image

Raspberry Pi Robotic Projects - Third Edition

By: Richard Grimmett, Jon Witts

Overview of this book

This book will allow you to take full advantage of Raspberry Pi Zero and Raspberry Pi 3 by building both simple and complex robotic projects. The book takes a mission-critical approach to show you how to build amazing robots and helps you decide which board to use for which type of robot. The book puts a special emphasis on designing mobile (or movable) robots using the Raspberry Pi Zero. The projects will show inexpensive, yet powerful, ways to take full advantage. It will teach you how to program Raspberry Pi, control the movement of your robot, and add features to your robots.
Table of Contents (13 chapters)
Raspberry Pi Robotic Projects - Third Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Adding video capability


No self-respecting R2D2 robot would be complete without the ability to see. Fortunately, your R2D2 has just the right spot for a webcam. Once you remove the bubble blowing port, you have the perfect spot for a round webcam.

Here is a picture of a round webcam, which is available on amazon.com and other online retailers:

Here is a picture of the webcam mounted in the slot:

You now need to connect the USB camera to the USB port of the Raspberry Pi. To access the USB webcam directly on the Raspberry Pi, you can use a Linux program called guvcview. Install this by powering up the Raspberry Pi, logging in, and entering the sudo apt-get install guvcview command.

To try your USB camera, connect it and reboot your Raspberry Pi. To check if the Raspberry Pi has found your USB camera, go to the /dev directory and type ls. You should see something similar to the following screenshot:

Look for video0, as this is the entry for your webcam. If you see it, the system knows your...