Write a sumo robot c program for an aduino board, using 2 motors. 2 phototransistors and 2 Led sensors( sensors 2 for the front and 2 for the back ) which are going to be responsible for keping the robot in the sumo ring, making sure the robot comes back into the ring when ever the sensors see the white boundry line.In addition add the code for 2 Sharp IR sensors(mounted to the front) which are going to be responsible for searching for the other robot by turning clockwise and driving towards it.
pseudocode:
if sharp IR detects object
scanning IR turns left
else //no object detected
scanning IR turns right
//robot motion code
if scanner is pointing far left
robot turns left
else if scanner is pointing far right
robot turns right
else //scanner pointing forward
robot drives straight
Note: Assume any pins for the sensors example A0,A1,A2