In this section, we are going to assemble the Raspberry Pi Zero and the motor driver on to the robot chassis.
- In order to mount the Raspberry Pi Zero on to the chassis, we need 4 M2.5 screws and nuts (Mounting hole specification available at https://www.raspberrypi.org/documentation/hardware/raspberrypi/mechanical/rpi-zero-v1_2_dimensions.pdf).
- The chassis we selected comes with slots that enables mounting the Raspberry Pi Zero directly on to the chassis. Based on your chassis design, you may have to drill clearance holes to mount the Raspberry Pi Zero.

Mounting the Raspberry Pi Zero onto the chassis
While mounting the Raspberry Pi Zero, we ensured that we are able to plug in the HDMI cable, USB cable, and so on for testing purposes.
- The chassis we have used is made of anodized aluminum;hence, it is nonconductive. We mounted the Raspberry Pi Zero directly, without any insulation between the chassis and the Raspberry Pi Zero.
Ensure that you don't short circuit any component by accidentally exposing them directly to conductive metal surfaces.
- Stack the motor driver on top of the Raspberry Pi Zero (as shown in the previous section).
- The two motors of the robot need to be connected to the Raspberry Pi Zero:
- The motor driver comes with motor terminals M1 through M4. Let's connect the left and right DC motors to M1 and M2, respectively.

Red and black wires connected from both the motors to the motor driver terminals
- Each motor comes with two terminals, that is, black wire and a red wire. Connect the black wire to the left-most terminal of the bridge M1 and the red wire to the right-hand side terminal of the bridge M1 (as shown in the picture earlier). Similarly, the right motor is connected to the bridge M2.
Now, that we have connected the motors, we need to test the motor function and verify that the motors are rotating in the same direction. In order to do so, we need to set up the robot's power supply.