Here we abandon all the infra red sensors in favour of a single Devantech SRF-05 sonar mounted on the front servo so that it can pan left and right. Much better result !!
Connect the sonar to pin C0 - using the +5v regulated supply
The servos should be connected to the un-regulated supply as follows:-
Connect the servo that moves the sonar to D4
Connect the left drive servo to D2
Connect the right drive servo to D3
If you want to use the micro-switches then connect the left one to C2, and the right one to C3.
The C++ source code can be downloaded here. You may need to change the makefile so that 'MCU_TARGET' is for your cpu, and 'F_CPU' is the speed of your cpu. You will also need to rebuild the C++ library by changing the makefile in the root folder of the library to have the same settings.