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

Hooking up a keyboard, mouse, and display


The next step is to connect a keyboard, mouse, and display to the Raspberry Pi Zero. To connect any device to the Raspberry Pi Zero, you'll need some sort of adapter or hub. You can buy a simple hub, which goes from the micro USB connector on the Raspberry Pi Zero to the more common standard connector. You can find these at most online electronics retailers, and it looks something like the following:

However, there will be projects when you will want to connect more than one device to the Raspberry Pi Zero. For these cases, you may want to consider purchasing a powered USB hub. Before deciding on the hub to connect to your board, you need to understand the difference between a powered USB hub and one that gets its power from the USB port itself.

Almost all USB hubs are unpowered. In other words, you don't plug in the USB hub separately. The reason for this is that almost all of these hubs are hooked up to computers with very large power supplies, and powering USB devices from the computer is not a problem. This is not the case for your board. The USB port on your board has very limited power capabilities, so if you are going to hook up devices that require significant power—a WAN adapter or a webcam, for instance—you're going to need a powered USB hub, one that provides power to the devices through a separate power source. Here is an image of such a device, available at http://www.amazon.com and other online retailers:

Note that there are two connections on this hub. The one to the far right is a power connection, which will be plugged into a battery or a USB power adapter with a USB port. The connection to the left is the USB connection, which will be plugged into the Raspberry Pi. To connect the powered USB board to the Raspberry Pi Zero, you need a cable that connects to a micro USB connector. Now, you'll have more connections to add a mouse and keyboard, webcams, and a USB WLAN device.

Now, you'll also need a display. There is a mini HDMI connector on the Raspberry Pi Zero. In order to connect it to an HDMI monitor, you'll need a mini HDMI to standard HDMI adapter or cable. You can also buy a cable that has a mini HDMI connector on one end and a regular HDMI connector on the other. Here is an image of the adapter:

To use this adapter, simply connect it to your Raspberry Pi Zero, then connect the cable with the regular HDMI connections to the adapter and your TV or monitor that has an HDMI input connector. As with the Raspberry Pi 3, you can also buy a cable that goes from mini HDMI to DVI.

So, connect your HDMI cable to your monitor and the Raspberry Pi Zero. Connect your USB hub to the Raspberry Pi Zero and connect your keyboard and mouse to the USB hub. Make sure that you connect all your devices before you power on the unit. Most operating systems support the hot-swap of devices, which means you are able to connect a device after the system has been powered on, but this is a bit shaky. You should always cycle power when you connect new hardware. Here is a picture of everything connected:

The USB connectors are connected to USB power adapters. Even though your hardware configuration is complete, you'll still need to complete the next section to power on the device. So, let's figure out how to install an operating system.