 #include "LimitSwitch.h"
 
 //////// Pins //////// 
-#define ELEVATOR_SWITCH_PIN     46
-#define DOOR_SWITCH_PIN         50
-#define ELEVATOR_PIN            4
-#define DOOR_PIN                5
+#define ELEVATOR_SWITCH_PIN     38
+#define DOOR_SWITCH_PIN         36
+#define BAG_SWITCH_PIN          32
+#define ELEVATOR_PIN            9
+#define DOOR_PIN                10
 #define CONVEYOR1_PIN           6
 #define CONVEYOR2_PIN           7
 

LimitSwitch doorSwitch(DOOR_SWITCH_PIN);
Servo conveyor1;
Servo conveyor2;

void setup() {    
  Serial.begin(9600);

}

void loop(){  
  // La porte est ouverte
  if ( ! doorSwitch.ReadInput() )
  {
    Serial.println("Elevator door opened. Closing...");
    // On la ferme et on attend
    conveyor1.writeMicroseconds(CONVEYOR_STOP);
    digitalWrite(DOOR_PIN, HIGH);
    doorSwitch.WaitForPress();
    digitalWrite(DOOR_PIN, LOW);
    Serial.println("Elevator door closed.");
  }
  else{
    // L'ascenseur n'est pas en haut
