         if(IR())
           delay(1000);
         else
-          delay(light());       
+          delay(light() * rand() % 2000);       
     }
 
     for(int i = start; i < start+n_serial; ++i)

  return 100000 / num;
}

int IR()
{
  int num = sonsor_reading(2);
  return num;
}


  Serial.print(nSerial);
  Serial.print(" ");
  Serial.println(command);
  Serial.flush();
}

int sonsor_reading(int pin)
