Connecting the motors to the Raspberry Pi
The cables that came with the motors do not have connectors that fit the Inventor Hat Mini motor ports. The Inventor Hat’s motor ports have pins for motor power and the encoder sensors built into these motors. How can we connect these? Having different-shaped connectors is a common problem. Let’s see how we can solve it.
Making connector cables
We are going to make some cables. We need to specify what we are connecting between first. The following diagram shows both ends of these connectors.
The motor connectors shown on the left of Figure 5.11 are 6-pin JST 1.0mm SH on the Inventor Hat Mini. The connectors on the right are for the motor, a 2-pin JST 2.0 PH, which powers/moves the motor, and a 4-pin JST 2.0 PH, which connects the encoder sensors built into these motors. At the bottom of the figures are pin outs for each connector.The motor came with cables, but they will not fit. Some adapting...