Chapter 2

Building Your First Python Robot

IN THIS CHAPTER

Bullet Building a robot

Bullet Understanding the components

Bullet Learning to program the components

In this chapter, we first build a robot and then show you how to use Python to talk to all the parts. Why build the robot? For two reasons: First, you save money by buying a kit-based robot versus a prebuilt one. Second, by building a robot, you get to know how all the parts fit together and work, and how to use Python to control those motors and sensors.

We have chosen a robot based on our friend, the Raspberry Pi single-board computer. You can get robots based on many other types of computers, including the Arduino, but with those smaller computers, you can’t do the kind of processing or artificial intelligence applications that you can on the Raspberry Pi.

After all, this is Python All-in-One For Dummies. Wouldn’t you like to be able to use some of the sophisticated Python tools described earlier in this book?

Python programs are available for the Arduino and ESP32 (Circuit Python, for example), but the small processor and memory on the Arduino are limitations. The Raspberry Pi is much better suited for high-level AI applications on robots. ...

Get Python All-in-One For Dummies, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.