Add a color sensor to the robot so that it can detect the color of the ball which is about to go on the chain.