Encoders for precise robot turns
All my code does is stop the motors when the front sensor detects a wall. My next step is to implement the encoders to give the robot a 90 degree turn.


would this work?

  if (wall_sensed()) turn_90right(); //if wall is sensed, turn 90 degrees to the right


You may also consider change 

  digitalWrite(5,LOW);   
  digitalWrite(6,LOW);


to:

  digitalWrite(MOTOR_LF,STOP);   //stop left front motor
  digitalWrite(MOTOR_LR,STOP);   //stop left right motor


so that


it is a lot more readable; and
if you were to change pin assignment, it is done consistently throughout your code.