       conveyor1_running_until = millis();
     }
     else{
+      Serial.println("Starting conveyors.");
       // Si les deux switches sont appuyées, on roule les deux tapis avec un petit pattern sur le premier.
       if(conveyor1_running_until != 0 && conveyor1_running_until < millis())
       {

      }
      conveyor2.writeMicroseconds(CONVEYOR_RUN);
    }
  }
}

unsigned long CONVEYOR1_RUNTIME = 1000;
unsigned long CONVEYOR1_STOPTIME = 3000;

void setup() {    
  Serial.begin(9600);
  
  elevatorSwitch.Setup();
  
  pinMode(ELEVATOR_PIN, OUTPUT);
  digitalWrite(ELEVATOR_PIN, LOW);
  pinMode(DRILL_PIN, OUTPUT);
  digitalWrite(DRILL_PIN, LOW);
  pinMode(CONVEYOR2_MOTOR_PIN, OUTPUT);
  digitalWrite(CONVEYOR2_MOTOR_PIN, LOW);
  
  conveyor1.writeMicroseconds(CONVEYOR_STOP); // Set initial position
  conveyor1.attach(CONVEYOR1_PIN);
  
  conveyor2.writeMicroseconds(CONVEYOR_STOP); // Set initial position
  conveyor2.attach(CONVEYOR2_PIN);
  
  pinMode(CONVEYOR2_MOTOR_PIN, OUTPUT);
  digitalWrite(CONVEYOR2_MOTOR_PIN, HIGH);
  
  //Drill time
  digitalWrite(DRILL_PIN, HIGH);
  delay(4000);
  digitalWrite(DRILL_PIN, LOW);
}

void loop(){
    digitalWrite(CONVEYOR2_MOTOR_PIN, HIGH);
    // L'ascenseur n'est pas en haut
    if ( ! elevatorSwitch.ReadInput() )
    {
      Serial.println("Elevator not at the top... Going up.");
      // Arreter le tapis sur l'ascenseur (au cas ou il roulerait...)
      conveyor1.writeMicroseconds(CONVEYOR_STOP);
      conveyor2.writeMicroseconds(CONVEYOR_STOP);
      // On monte l'ascenseur et on attend
      Serial.println("Starting elevator.");
      digitalWrite(ELEVATOR_PIN, HIGH);
      elevatorSwitch.WaitForPress();
      Serial.println("Elevator at the top... Shutting down motors.");
      // Arreter l'ascenseur
      digitalWrite(ELEVATOR_PIN, LOW); 
      Serial.println("Stopping elevator.");
