Book Image

Raspberry Pi Robotics Projects - Second Edition

By : Dr. Richard Grimmett
Book Image

Raspberry Pi Robotics Projects - Second Edition

By: Dr. Richard Grimmett

Overview of this book

<p>This book starts with the essentials of turning on the basic hardware. It provides the capability to interpret your commands and have your robot initiate actions. In this second edition, you will learn more specifics on how to use the Raspberry Pi’s GPIO pins to communicate with and control a wide range of additional hardware.</p> <p>Teaching you to use the Raspberry Pi from scratch, this book will discuss a wide range of capabilities that can be achieved with it. These capabilities include voice recognition, human-like speech simulation, computer vision, motor control, GPS location, and wireless control. You will then learn how to combine these capabilities to create your own robotics projects. By the end of the book, you will be able to employ the Raspberry Pi to build some intricate and enthralling robotics projects with ease.</p>
Table of Contents (18 chapters)
Raspberry Pi Robotics Projects Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Preface

Robots seem to be everywhere these days. Not only in movies but also in our day-to-day lives. They vacuum floors, play with children, and build automobiles. These new machines are quickly migrating from university and government labs to our homes, offices, schools, and playgrounds. A similar migration has occurred in recent years with computers.

A good part of this migration, as in the case of computers, is that the untrained but interested general population has been able to take part in the development of these new machines. A big reason for this is the introduction of inexpensive hardware and free, open source hardware. Initially, it was Arduino, an inexpensive processor developed for the do-it-yourself crowd, which enabled normal people to create robotics projects with complex functionality. More recently, Raspberry Pi has extended this capability by providing an inexpensive, small, but powerful Linux computer for these projects.

This second edition is designed to allow you to take full advantage of the capabilities of Raspberry Pi in your robotics projects. It will not only teach you how to use the USB port to add additional hardware capabilities, but it will also show you how to connect the hardware to the GPIO as well. It will provide a step-by-step guide to get you well on your way to building your very own amazing robotics projects.

What this book covers

Chapter 1, Getting Started with Raspberry Pi, helps you to power up your Raspberry Pi, connect it to a keyboard, mouse, display, and remote computer, and begin to access all that potential computing power.

Chapter 2, Programming Raspberry Pi, teaches you the basics of how to program the Raspberry Pi, both in Python and in the C programming languages.

Chapter 3, Providing Speech Input and Output, teaches your Raspberry Pi to both speak and listen.

Chapter 4, Adding Vision to Raspberry Pi, shows you how to use standard USB and Raspberry Pi cameras to allow your robotics projects to see.

Chapter 5, Creating Mobile Robots on Wheels, shows you how to connect the Raspberry Pi to a mobile wheeled platform and control its motors, so your robots can be mobile.

Chapter 6, Controlling the Movement of a Robot with Legs, teaches you how to make your robot walk.

Chapter 7, Avoiding Obstacles Using Sensors, shows you how to sense the world around you. Now that your robot is mobile, you'll want to avoid or find objects.

Chapter 8, Going Truly Mobile – The Remote Control of Your Robot, shows you how to control your robot wirelessly—you'll want your robot to move around untethered by cables.

Chapter 9, Using a GPS Receiver to Locate Your Robot, shows you how to use a GPS receiver so that your robot knows where it is—if your robot is mobile, it might get lost.

Chapter 10, System Dynamics, focuses on how to bring it all together to make complex robots since you've got lots of capability.

Chapter 11, By Land, Sea, and Air, shows you how to add capabilities to robots that sail, fly, and even go under the water.

What you need for this book

Here's a partial list of the software you will need for the book:

  • 7-Zip: This is a utility to archive and unarchive software

  • Image Writer for Windows: This is used to write images to an SD card

  • WinSCP: This provides the ability to transfer files to/from a PC

  • PuTTY: This allows the user remote access to the Raspberry Pi

  • VNC Server/VNC Viewer: This allows the user remote access to the graphical interface of the Raspberry Pi

Who this book is for

This book is for anyone who is keen on using the Raspberry Pi to create robotics projects that have previously been the domain of the research labs of major universities or defense departments. Some programming background is useful, but if you know how to use a personal computer you can, with the aid of the step-by-step instructions in this book, construct complex robotics projects that can move, talk, listen, see, swim, or fly.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Go to the /home/Raspbian/Desktop directory."

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

a = input("Input value: ")
b = input("Input second value: ")
c = a + b 
print c

Any command-line input or output is written as follows:

cd /home/Raspbian/Desktop

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Go to the Raspbian section and select the .zip file just to the right of the image identifier."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/0146OS_ColoredImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.