 long                    intX  = 0;
 long                    intY  = 0; 
 
-bool start = false;
-
-
+
+unsigned long trigGyro = 100;
+unsigned long trigSec  = 1000;
+unsigned long trigG    = 0;
+unsigned long trigS    = 0;
+
+
+bool production = false;
+bool LED_PING   = false;
+bool BOOT = false;
+
+
+
+
+//=============================================================================//
+//   SETUP
+//=============================================================================//
 void setup()
 {
-  pinMode( pinEnable, OUTPUT );
-  pinMode( pinDir   , OUTPUT );
-  pinMode( pinStep  , OUTPUT );
-  pinMode( pinDirY   , OUTPUT );
-  pinMode( pinStepY  , OUTPUT );
-  
+	pinMode( pinEnable , OUTPUT );
+    pinMode( pinDirX   , OUTPUT );
+    pinMode( pinStepX  , OUTPUT );
+    pinMode( pinDirY   , OUTPUT );
+    pinMode( pinStepY  , OUTPUT );
+    pinMode( PING      , OUTPUT );
+    pinMode( Z_POSITION, INPUT  );
+    
+    
     Serial.begin(9600);
     
-  Serial.println("Initializing I2C devices...");
-  Serial.print("I2C Adress = ");
-  Serial.println(adress);
-  
-  Wire.begin(adress);
+    Serial.println("Initializing I2C devices...");
+    Serial.print("I2C Adress = ");
+    Serial.println(adress);
+  
+    Wire.begin(adress);
     //Wire.onReceive(); // register event
 
     

  if(x > 90) vx = (x - 90);
  
  speedX = 1000 / (vx);
    speedX = speedX / multiplier; // DEL
  //if(speedX < 15) speedX = 15;
  

  // Mise en route du moteur

  if(y > 90) vy = (y - 90);
  
  speedY = 1000 / (vy);
  speedY = speedY * multiplier; // DEL
  if(speedY < 15) speedY = 15;
  

  // Mise en route du moteur
