Hardware configuration
Let's now see how to assemble the robot:
First, I recommend that you mount the ultrasonic sensor directly on the robot chassis using an adapter, if possible. These usually come with the ultrasonic sensor.
Then, mount the Galileo board on top of the robot chassis using metal spacers, which usually come with the robot chassis.
After this, you can mount the motor shield on top of the Galileo board.
Also, connect the motors to the motor shield by ensuring that you connect both motors with the same polarity on the shield.
This is a view of the front of the robot at this stage:
At this stage, the back view of the robot is as follows:
Now, it's time to connect the ultrasonic sensor. Note that if you want to use a prototyping shield (so as to connect more sensors in the future), this is the time to do so. For the ultrasonic sensor, you have three pins to connect: VCC, GND, and the signal pin. When looking at the back of the sensor, this signal pin is the fourth pin starting from...