 }
 
 boolean toDigital(uint8_t pin){
+  int thresholds[6] = WB_THRESHOLDS;
   int reading = analogRead(pin);
   delayMicroseconds(IR_DELAY);
   // Serial.println(reading);
-  return reading > WB_THRESHOLD;
+  // Works only on UNO
+  return reading > thresholds[(pin-14)];
 }
 
 void print_digital_readings(){

   Serial.print(right);
   Serial.print("\t");
   Serial.println(far_right);

}

void print_analog_readings(){

   boolean center_right = toDigital(CENTER_RIGHT);
   boolean right =        toDigital(RIGHT);
   boolean far_right =    toDigital(FAR_RIGHT);

   Serial.print(far_left);
   Serial.print("\t");
