The first 10 seconds of a game is called the autonomous mode which requires your robot to execute a series of pre-programmed instructions that will drive and shoot a goal to get points. The robot is usually programmed to drive straight forward, locate the goal, calculate the distance to shoot the goal in, and shoot. A sample of this code is seen here:
In our case, autonomous code utilizes the camera code which will detect particles of light from the goal and use that to calculate the distance that the robot needs to travel before it satisifies a condition to shoot the ball. After the irst 10 seconds, the robot will be controlled by joysticks driven by human players.