   if((leftSensor == 0 && middleSensor == 1 && rightSensor == 0))
   {
     fwd();
+    Serial.println("Forward");
     lastAction = 1;
   }
   // if the right sensor is the only sensor that have the value 1, the bot need to compensate by turning right
   else if((leftSensor == 0 && middleSensor == 0 && rightSensor == 1))
   {
     steerLeft();
+    Serial.println("SteerLeft");
     lastAction = 2;
   }
   // if the left sensor is the only sensor that have the value 1, the bot need to compensate by turning left
   else if((leftSensor == 1 && middleSensor == 0 && rightSensor == 0))
   {
     steerRight();
+    Serial.println("SteerRight");
     lastAction = 3;
   }
   else
   {
-    stop();
+    if(lastAction == 1){fwd();Serial.println("Forward**");}
+    else if(lastAction == 2){steerLeft();Serial.println("SteerLeft**");}
+    else if(lastAction == 3){steerRight();Serial.println("SteerRight**");}
+    else {stop();Serial.println("Stop");}
   }
+  delay(loopDelay);
 }
 
 void readSensors(){


// Variable that works as a factor regulating the turn speed. i.e 1.8*spedVal = turnspeed
float turnMulti = 1.7;

myMotors Motors;   // Create Motors object
mySensors Sensors; // Create Sensors object

int rightSensor = 0;

// This is the speed value, (0-255)
int speedVal = 70; // 60 seem to be a good value
//int turnSpeed = 60;
int turnDelay = 0;
// int containing last action: 0 starting value, 1 fwd, 2 steerLeft, 3 steerRight
