Reading the IMU
The IMU is a special measurement unit that will tell you about the movement of your robot. It uses a combination of accelerometers and gyroscopes, sometimes also magnetometers. This will allow your robot to sense when it is falling over, and then can respond and right itself.
Here is an image of a unit that is available at most online electronic retailers:
The connections to this chip are straightforward, and the device communicates with Raspberry Pi using the I2C bus. Since you are using the motor controller, you can connect the device to the I2C bus on the controller board. Here is a close-up of the I2C connector on the RaspiRobot board:
There are five connections. You'll connect your device VCC to the 5V connection on the motor controller. You'll connect GND on your device to GND on the motor controller. Then connect the SCL connector on your device to the C connector on the motor controller and the SDA pin on the device to the D connection on the motor controller. Notice...