O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Raspberry Pi Robotics Projects - Second Edition

Book Description

Get the most out of Raspberry Pi to build enthralling robotics projects

In Detail

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.

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.

What You Will Learn

  • Unbox, power-up, and configure Raspberry Pi with Ubuntu, a powerful version of Linux
  • Exercise vision control in your projects to distinguish colors, patterns, or movements
  • Apply and control speech software to enable your projects to speak
  • Discover external hardware to enable your robotics projects to move
  • Create complex robotics projects that can move, swim, or even fly
  • Interact with your projects wirelessly so that they can be truly autonomous
  • Use the GPIO to communicate with external sensors

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Raspberry Pi Robotics Projects Second Edition
    1. Table of Contents
    2. Raspberry Pi Robotics Projects Second Edition
    3. Credits
    4. About the Author
    5. About the Reviewer
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the color images of this book
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting Started with Raspberry Pi
      1. Getting started
        1. The unboxing
      2. Powering your board
      3. Hooking up a keyboard, mouse, and display
      4. Installing the operating system
      5. Accessing the board remotely
        1. Establishing Internet access on Raspberry Pi B+
        2. Establishing Internet access on Raspberry Pi A+
        3. Accessing your Raspberry Pi from your host PC
      6. Summary
    9. 2. Programming Raspberry Pi
      1. Basic Linux commands on Raspberry Pi
      2. Creating, editing, and saving files on Raspberry Pi
      3. Creating and running Python programs
      4. Basic programming constructs on Raspberry Pi
        1. The if statement
        2. The while statement
        3. Working with functions
        4. Libraries/modules in Python
        5. Object-oriented code
      5. Introduction to the C/C++ programming language
      6. Summary
    10. 3. Providing Speech Input and Output
      1. Hooking up the hardware to make and input sound
      2. Using Espeak to allow our projects to respond in a robotic voice
      3. Using PocketSphinx to accept your voice commands
      4. Interpreting commands and initiating actions
      5. Summary
    11. 4. Adding Vision to Raspberry Pi
      1. Connecting the USB camera to Raspberry Pi and viewing the images
      2. Connecting the Raspberry Pi camera board and viewing the images
      3. Downloading and installing OpenCV – a fully featured vision library
      4. Using the vision library to detect colored objects
      5. Summary
    12. 5. Creating Mobile Robots on Wheels
      1. Gathering the required hardware
      2. Using the Raspberry Pi GPIO to control a DC motor
      3. Controlling your mobile platform programmatically using Raspberry Pi
      4. Controlling the speed of your motors with PWM
        1. Adding program arguments to control your platform
      5. Making your platform truly mobile by issuing voice commands
      6. Summary
    13. 6. Controlling the Movement of a Robot with Legs
      1. Gathering the hardware
      2. Connecting Raspberry Pi to the mobile platform using a servo controller
        1. Connecting the hardware
        2. Configuring the software
      3. Creating a program in Linux to control the mobile platform
      4. Making your mobile platform truly mobile by issuing voice commands
      5. Summary
    14. 7. Avoiding Obstacles Using Sensors
      1. Connecting Raspberry Pi to an infrared sensor using USB
        1. Connecting a sensor using the USB interface
      2. Connecting the IR sensor using the GPIO ADC
      3. Connecting Raspberry Pi to a USB sonar sensor
        1. Connecting the hardware
      4. Using a servo to move a single sensor
      5. Summary
    15. 8. Going Truly Mobile – The Remote Control of Your Robot
      1. Gathering the hardware
      2. Connecting Raspberry Pi to a wireless USB keyboard
      3. Using the keyboard to control your project
      4. Working remotely with your Raspberry Pi through a wireless LAN
      5. Working remotely with your Raspberry Pi through ZigBee
      6. Summary
    16. 9. Using a GPS Receiver to Locate Your Robot
      1. Connecting Raspberry Pi to a USB GPS device
      2. Accessing the USB GPS programmatically
      3. Connecting Raspberry Pi to an RX/TX (UART) GPS device
      4. Communicating with the RX/TX GPS programmatically
      5. Taking a look at the GPS data
      6. Summary
    17. 10. System Dynamics
      1. Creating a general control structure
      2. Using the structure of the Robot Operating System to enable complex functionalities
      3. Summary
    18. 11. By Land, Sea, and Air
      1. Using Raspberry Pi to sail
        1. Getting started
      2. Using Raspberry Pi to fly robots
      3. Using Raspberry Pi to make the robot swim underwater
      4. Summary
    19. Index