Code for robot with motors & LCD screen

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 7, 5, 4, 3, 6);
float distance;
volatile int count = 0;
// volatile is a keyword known as a variable qualifier.
int leftInput1 = A2;
// Input from the Sensor send to various pin of Arduino from A0 – A3.
int leftInput2 = A3;
int rightInput1 = A0;
int rightInput2 = A1;
int leftMotor = 9;
// Arduino output PWM to motor for speed control.
int rightMotor = 10;
int leftValue1 = 0;
// The digital value assigned to the digital read from analog pin from the Arduino.
int rightValue1 = 0;
int leftValue2 = 0;
int rightValue2 = 0;
unsigned long lastmillis = 0;
// Asigned lastmillis variable to store the current time value.
void setup()
// put your setup code here, to run once:
{
  Serial.begin(9600);
  lcd.begin(2, 20);
  // setup instruction for LCD 2×20.
  lcd.setCursor(0, 0);
  //Intialise the position of the cursor for print
  lcd.print("distance (cm)");
  // The title print in the LCD displays
  pinMode (leftMotor, OUTPUT);
  // output is the vale assign to left motor
  pinMode (rightMotor, OUTPUT);
  // output is the value assign to Right motor
  attachInterrupt(0, techno, RISING);
  //interrupt zero (0) is on pin two(2) activate on rising i.e low to high.
  // 31
}
void loop()    // put your main code here, to run repeatedly:
{
  leftValue1 = digitalRead (leftInput1);
  // digital data from the input sensor is taken
  rightValue1 = digitalRead (rightInput1);
  // there are all together four sensors two at the left most and two at the rightmost
  leftValue2 = digitalRead (leftInput2);
  rightValue2 = digitalRead (rightInput2);
  if (millis() - lastmillis >= 6000)
    //Uptade every Six seconds
  {
    detachInterrupt(0);
    distance = distance + 2 * 3.1416 * 3 * count;
    lcd.setCursor(0, 1);
    lcd.print(distance);
    count = 0;
    // Restart the RPM counter
    lastmillis = millis();
    // Update lastmillis to maintain count difference 6 seconds.
    attachInterrupt(0, techno, RISING);
  }
  if    ( leftValue1 == HIGH && leftValue2 == HIGH && rightValue1 == HIGH && rightValue2 == HIGH)    {
    digitalWrite(leftMotor, LOW);
    //When all the sensors are out of track it stop for two sends and begin to  search for path for 1sec and again repeat
    digitalWrite(rightMotor, LOW);
    delay(2000);
    digitalWrite(leftMotor, LOW);
    digitalWrite(rightMotor, HIGH);
    delay(1000);
  }
  else   if      ( leftValue1 == HIGH && leftValue2 == LOW && rightValue1 == LOW && rightValue2 == LOW)     {
    //32
    analogWrite (leftMotor, 191);
    //The left motor moves with slightly slow speed while right motor moves  with slower speed
    analogWrite (rightMotor, 185);
    //The  robot moves turns toward the right
    //
    delay(1000);
  }
  else    if ( leftValue1 == HIGH && leftValue2 == HIGH && rightValue1 == LOW && rightValue2 == LOW)    {
    analogWrite (leftMotor, 191 );
    //The left motor moves with slightly slow speed while right motor moves  with slower speed
    analogWrite (rightMotor, 64);
    //The  robot moves turns toward the right
    //
    delay(1000);
  }
  else     if ( leftValue1 == HIGH && leftValue2 == HIGH && rightValue1 == HIGH && rightValue2 == LOW)    {
    analogWrite (leftMotor, 255 );
    //The left motor moves with slightly slow speed while right motor moves  with slower speed
    analogWrite (rightMotor, 64);
    //The  robot moves turns toward the right
    //
    delay(1000);
  }
  else  if ( leftValue1 == LOW && leftValue2 == LOW && rightValue1 == LOW && rightValue2 == HIGH)      {
    analogWrite (leftMotor, 127);
    //The left motor moves with slightly slow speed while right motor moves  with slower speed
    analogWrite (rightMotor, 191);
    //
    delay(1000);
  }
  else      if ( leftValue1 == LOW && leftValue2 == LOW && rightValue1 == HIGH && rightValue2 == HIGH)      {
    //33
    analogWrite (leftMotor, 64);
    //The left motor moves with slightly slow speed while right motor moves  with slower speed
    analogWrite (rightMotor, 191);
    //
    delay(1000);
  }
  else      if ( leftValue1 == LOW && leftValue2 == HIGH && rightValue1 == HIGH && rightValue2 == HIGH)      {
    analogWrite (leftMotor, 64);
    //The left motor moves with slightly slow speed while right motor moves  with slower speed
    analogWrite (rightMotor, 255);
    //
    delay(1000);
  }
  else if ( leftValue1 == LOW && leftValue2 == LOW && rightValue1 == LOW && rightValue2 == LOW)      {
    analogWrite (rightMotor, 255);
    //  The robot moves with full speed when all of the sensor is low.
    analogWrite (leftMotor, 255 );
  }
}
void techno()   {
  count ++;
}

(Moderator cleaned up & split into new topic, just curious to see what was intended.
Compiles with a little cleanup. Is there a question to go with this?)
(Sorry about making your question seem a little odd @sterretje)

@gunal07

So?

What do you try to achieve with reviving a thread that is over 8 years old?