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)

Summary

In this chapter, we have learned how to add distance sensing to our robots, along with the different kinds of sensors that are available. We've seen code to make it work. We then created behaviors to avoid walls, and looked at how a simplified, but flawed behavior could be made, and how a more sophisticated and smoother behavior would make for a better system.

At the end of this chapter, we added a small menu system to our robot to start different modes from a connected web browser.

In the next chapter, we will be looking again into driving predetermined paths and straight lines, but using an encoder to make sure that the robot moves far more accurately.

We will use an encoder to compare our motor's output with our expected goals and get more accurate turns.