In this chapter, we will take the robot we started building in the last chapter, connect the motors to the Raspberry Pi, and build the Python code to make them move. We will cover programming techniques to create a layer between the physical robot and its behavior code to reduce the impact of hardware changes. The robot will move! We will finish by taking the robot on a small set path.
The following topics will be covered in this chapter:
- How to connect motors to the Raspberry Pi
- How to test motors with simple code
- How to steer the robot—thinking about interfaces
- How to make a robot code object, a layer of code for the motors and chassis
- How to make the robot drive a repeatable path