 #define CONVEYOR2_PIN           7
 
 //////// PWM //////// 
-#define ELEVATOR_STOP  1500
-#define ELEVATOR_RUN   1400
-#define DOOR_STOP      1500
-#define DOOR_RUN       1400
 #define CONVEYOR_RUN   1400
 #define CONVEYOR_STOP  1500
 
 //////// Variables //////// 
 LimitSwitch elevatorSwitch(ELEVATOR_SWITCH_PIN);
 LimitSwitch doorSwitch(DOOR_SWITCH_PIN);
-Servo elevator;
-Servo door;
 Servo conveyor1;
 Servo conveyor2;
-
 
 void setup() {    
   Serial.begin(9600);

  {
    Serial.print("Elevator door opened. Closing...");
    // On la ferme et on attend
    door.writeMicroseconds(DOOR_RUN);
    doorSwitch.WaitForPress();
    door.writeMicroseconds(DOOR_STOP);
    Serial.print("Elevator door closed.");
  }
  
  // L'ascenseur n'est pas en haut
  if ( ! elevatorSwitch.ReadInput() )
  {
    // Arreter le tapis sur l'ascenseur (au cas ou il roulerait...)
    conveyor2.writeMicroseconds(CONVEYOR_STOP);
    // On monte l'ascenseur et on attend
    Serial.print("Starting elevator.");
    elevator.writeMicroseconds(ELEVATOR_RUN);
    elevatorSwitch.WaitForPress();
    // Arreter l'ascenseur
    elevator.writeMicroseconds(ELEVATOR_STOP); 
    Serial.print("Stopping elevator.");
  }
          
  // Demarrer le tapis de l'ascenseur
  Serial.print("Starting elevator's conveyor belt.");
  conveyor2.writeMicroseconds(CONVEYOR_RUN);
 
}

  elevatorSwitch.Setup();
  doorSwitch.Setup();
  
  pinMode(ELEVATOR_PIN, OUTPUT);
  pinMode(DOOR_PIN, OUTPUT);
  digitalWrite(ELEVATOR_PIN, LOW);
  digitalWrite(DOOR_PIN, LOW);
  
  conveyor1.writeMicroseconds(CONVEYOR_STOP); // Set initial position
  conveyor1.attach(CONVEYOR1_PIN);
  
  conveyor2.writeMicroseconds(CONVEYOR_STOP); // Set initial position
  conveyor2.attach(CONVEYOR2_PIN);
}

void loop(){  
