
Our next programming problem with this part was that the robot spun around to fast and this did not give the ultrasonic sensor time to see anything so we had to slow down the turn, this allowed the ultrasonic sensor time to see the opponent.

Because of the gearing sometimes the wheels jam, it needs a run up in order work properly so we made the robot reverse a little bit if the wheels do not spin for a period of time. This is the thinking half from the post above.

This part of the program is the line detection, when it sees the line it stops reverses and then looks for the opponent. We had a problem with the robot being to fast for the line sensor but this was solved when we made the robot spin to look for its opponent as this made it unlikely for it to miss the opponent (in the small ring) and run out the ring anyway.