To control the robot, we are going to write a program in Python that detects key presses and use them to control the power to the robot’s motors on the robot. To do this, we will use pygame, which provides a useful way of finding out whether or not keys are pressed. It will be much easier to set the program up before we attach the Raspberry Pi to the chassis. Therefore, attach the RaspiRobotBoard to the Raspberry Pi, but leave the motors and battery disconnected and power up the Pi from your normal USB power supply.