Robot assembly

It's now time to assemble the robot. We will show you the steps you need to follow on the robot kit we used for this project, but they can be applied to any other equivalent robot kit. The first step is to put the battery at the base of the robot, as shown in the following image:

Robot assembly

Note that some metal spacers were also used at the base of the robot to maintain the battery in place and to provide support for the rest of the components. These spacers can also be found on the DFRobot website. Then, you can screw on two more spacers and the Arduino Yún board to the top of the chassis, as shown in the following image:

Robot assembly

Then, we added the Arduino Uno compatible board on top of the two metallic spacers. At this point, you can screw on the Arduino Uno board; all the other components will just be plugged into these boards, as shown in the following image:

Robot assembly

Then, you can simply plug the motor shield on top of the Arduino Uno board. At this point, you can also connect the cables that come from the DC motors to the motor shield screw headers. Be careful with this step; it is quite easy to plug the wrong cables from the DC motors. You need to connect each motor on a different connector on the motor shield board, as shown in the following image:

Robot assembly

Finally, you can plug the prototyping shield on top of the robot. At this point, we already connected the ultrasonic sensor: ground goes to Arduino ground, VCC to Arduino's 5V pin on the prototype shield, and the signal pin goes into pin A0 of the Arduino board. If your ultrasonic sensor works with a digital interface, for example, you might want to use different pins. Please read the datasheet of your ultrasonic sensor for more information. The following image shows the state of the robot at this step:

Robot assembly