4MAKING YOUR ROBOT MOVE

AT THIS STAGE, YOU HAVE A SWEET-LOOKING RASPBERRY PI ROBOT THAT DOESN’T DO ANYTHING. . . YET! TO UNLOCK THE CAPABILITIES OF ALL THE HARDWARE YOU JUST WIRED UP, YOU’LL HAVE TO SINK YOUR TEETH INTO SOME MORE PROGRAMMING.

In this chapter, I’ll show you how to use the Python programming language to make your robot move. We’ll cover basic movement, making your robot remote-controlled, and varying its motor speed.

THE PARTS LIST

Most of this chapter will be about coding the robot, but to enable remote control you’ll need a couple of parts later:

  • Nintendo Wii remote
  • Bluetooth dongle if you’re using a Pi older than a Model 3 or Zero W

UNDERSTANDING THE H-BRIDGE

Most single-motor controllers are based around an electronics concept ...

Get Learn Robotics with Raspberry Pi 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.