All of the current suggestions are pretty good. In regards,
(This involves IF and ELSE statements) If i have a program with 2 different IF statements in it and can have 1 ELSE for them?
the answer was buried in one of the replies, ie, use 1 or more ... else if ... and last else as default.
if { }
else if { }
else if { }
else { }
If you have a lot of different options, look at using the switch() ... case construct.
Also, I'm working on a small robot with continuous rotation servos too. As others mentioned,
your delays sound very long, eg, 4.5 sec to turn will probably cause the robot to spin over a
very large angle. What is common is to get it to turn a few degrees, say 20-30 degrees [ie, for
probably 200-500 msec or so], and then go forwards again. Then, if the robot immediately hits
the same obstacle, it will then back and turn a little more, and so make a gradual avoidance
turn. If it turns too far in one go, then the robot will be making emormous changes and act
too crazy.
Also, as Morris indicated, your code has gotten complex enough that you should start modularizing
it, to make it more readable. Eg,
if (Lsensor == HIGH) back_turn_right();
else if (Rsensor == HIGH) back_turn_left();
else { /* just continue */ }