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

Getting Started with Raspberry Pi Zero

Book Description

Get started with the smallest, cheapest, and highest-utility Pi ever - Raspberry Pi Zero

About This Book

  • Get started with Raspberry Pi Zero and put all of its exciting features to use
  • Create fun games and programs with little or no programming experience
  • Learn to use this super-tiny PC to control hardware and software for work, play, and everything else

Who This Book Is For

This book is for hobbyists and programmers who are taking their first steps toward using Raspberry Pi Zero. No programming experience is required, although some Python programming experience might be useful.

What You Will Learn

  • Understand how to initially download the operating system and set up Raspberry Pi Zero
  • Find out how to control the GPIO pins of Raspberry Pi Zero to control LED circuits
  • Get to grips with adding hardware to the GPIO to control more complex hardware such as motors
  • Add USB control hardware to control a complex robot with 12 servos
  • Include speech recognition so that projects can receive commands
  • Enable the robot to communicate with the world around it by adding speech output
  • Control the robot from a distance and see what the robot is seeing by adding wireless communication
  • Discover how to build a Robotic hand and a Quadcopter

In Detail

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.

Style and approach

This is a practical and fun "getting started" tutorial that will guide you through everything new that the Raspberry Pi has to offer.

Table of Contents

  1. Getting Started with Raspberry Pi Zero
    1. Table of Contents
    2. Getting Started with Raspberry Pi Zero
    3. Credits
    4. About the Author
    5. About the Reviewer
    6. www.PacktPub.com
      1. eBooks, discount offers, and more
        1. Why subscribe?
    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 example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Getting Started with Raspberry Pi Zero
      1. Setting up the Raspberry Pi Zero
      2. Powering the board
      3. Hooking up a keyboard, mouse, and display
      4. Installing the operating system
      5. Adding Internet access
        1. Accessing your Raspberry Pi Zero from your host PC
      6. Summary
    9. 2. Programming Raspberry Pi Zero
      1. Powering up Raspberry Pi Zero with Linux
      2. Creating, editing, and saving files
      3. Creating and running Python programs
      4. Basic programming constructs on Raspberry Pi Zero
        1. The if statement
        2. The while statement
        3. Working with functions
        4. Libraries/modules in Python
      5. Summary
    10. 3. Accessing the GPIO Pins on Raspberry Pi Zero
      1. The GPIO capability of Raspberry Pi Zero
      2. Simple GPIO digital voltage output
        1. Raspberry Pi Zero and LED code
      3. Adding a sonar sensor
        1. Raspberry Pi Zero and the sonar sensor code
      4. Connecting a digital compass to Raspberry Pi Zero
      5. Accessing the compass programmatically
      6. Summary
    11. 4. Building and Controlling a Simple Wheeled Robot
      1. The basic platform
      2. Controlling an H-bridge interface to the DC motors
      3. Controlling your mobile platform programmatically using the Raspberry Pi Zero
      4. Controlling the speed of your motors with PWM
      5. Using a motor controller board to control the DC motors
      6. Controlling the vehicle using the Raspberry Pi Zero in Python
      7. Planning your path
      8. Summary
    12. 5. Building a Robot That Can Walk
      1. Robots that can walk
      2. How servo motors work
      3. Building the quadruped platform
      4. Using a servo controller to control the servos
      5. Communicating between the servo controller and a PC
      6. Connecting the servo controller to the Raspberry Pi Zero
      7. Creating a program in Linux to control your quadruped
      8. Summary
    13. 6. Adding Voice Recognition and Speech – A Voice Activated Robot
      1. Communication between the Raspberry Pi Zero and the robot
      2. Giving your robot voice commands
      3. Using eSpeak to allow your robot to respond with an audible voice
      4. Using pocketsphinx to accept your voice commands
      5. Interpreting commands and initiating actions
      6. Summary
    14. 7. Adding Raspberry Pi Zero to an RC Vehicle
      1. Configuring and controlling an RC car with Raspberry Pi Zero
      2. Controlling the RC car in Python
      3. Accessing the RC car remotely
      4. Connecting a webcam
      5. Summary
    15. 8. Playing Rock, Paper, or Scissors with Raspberry Pi Zero
      1. A robotic hand
      2. Moving the robotic hand
      3. Connecting the servo controller to the Raspberry Pi Zero
      4. Creating a program on Raspberry Pi Zero so that you can control your hand
      5. Installing a USB camera on Raspberry Pi Zero
      6. Downloading and installing OpenCV – a fully featured vision library
      7. Gesture detection
      8. Summary
    16. 9. Adding Raspberry Pi Zero to a Quadcopter
      1. Constructing the platform
      2. Mission planning software
      3. Summary
    17. Index