Connecting the motors to the Raspberry Pi
In this section, we will connect the motors to the Raspberry Pi. Once we have connected them, we can use code on the Raspberry Pi to control the motors and make the robot move. Figure 6.33 is the block diagram for the robot that we are building in this chapter. We will be using the Full Function Stepper Motor HAT as the controller board, calling it the Motor HAT for short.
This block diagram is similar to the type shown in Chapter 3, Exploring the Raspberry Pi. First, it starts with the Raspberry Pi, here in gray, as we've chosen that as our controller. Connected to the Pi is the Motor HAT, with instructions flowing from the Raspberry Pi to this board. The Motor HAT and its connections are highlighted as we are adding these parts in this chapter. As we build on this block diagram in later chapters, existing components will be in the color gray. Added components will be highlighted with red to show what is new. Finally, the two motors...