Book Image

Learn Robotics Programming

By : Danny Staple
Book Image

Learn Robotics Programming

By: Danny Staple

Overview of this book

We live in an age where the most difficult human tasks are now automated. Smart and intelligent robots, which will perform different tasks precisely and efficiently, are the requirement of the hour. A combination of Raspberry Pi and Python works perfectly when making these kinds of robots. Learn Robotics Programming starts by introducing you to the basic structure of a robot, along with how to plan, build, and program it. As you make your way through the book, you will gradually progress to adding different outputs and sensors, learning new building skills, and writing code for interesting behaviors with sensors. You’ll also be able to update your robot, and set up web, phone, and Wi-Fi connectivity in order to control it. By the end of the book, you will have built a clever robot that can perform basic artificial intelligence (AI) operations.
Table of Contents (21 chapters)

Planning our robot

Let's put all of this to use, and plan the robot that we are making in this book. Although as we go through chapters we will be adding new components each time, having an overall map in our minds as we go helps us to see where we are. It is quite exciting to start to picture all the things a robot will do. Let's start with a list of what our robot will do and be:

  • It will have wheels and be able to drive around the floor
  • It will have a Raspberry Pi 3 controller
  • It will have a motor controller for the wheels
  • It will be able to follow lines with a pair of line following sensors
  • It will be able to indicate its status with a set of multicolored LEDs
  • The robot will use a pair of servo motors for a pan and tilt mechanism
  • It will be able to avoid walls and navigate around obstacles with either ultrasonic or laser distance sensors
  • It will have an encoder...