Chapter 2

Building Your First Python Robot


Bullet Building a robot

Bullet Understanding the components

Bullet Learning to program the components

In this chapter, we open up a robot to take a look inside, and we show you how to talk to all the parts with Python. We tell you how to program a robot after you build it. Why build the robot first? For two reasons: First, a kit-based robot is inexpensive compared to buying a prebuilt one. Second, by building a robot you get to know how a robot works and how you can use Python to control it.

We have chosen a robot that is based on our friend the Raspberry Pi. You can get robots that are based on many other computers, including the Arduino, but with those smaller computers, you can’t do the kind of processing or artificial intelligence 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 tools you learned earlier in this book?

Introducing the Mars Rover PiCar-B

When we were deciding which robot to build in this book, we looked at and assembled four different small robot cars. All of them were similarly priced, and each of them had some drawbacks. However, after ...

Get Python All-in-One For Dummies 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.