   ultraCompteur++;
 }
 
-boolean isGreen(){
- return digitalRead(pinColor);  
+boolean isGreen() {
+  return digitalRead(pinColor);
 }
 
 void stopRight() {

      Serial.println("left on");
      setLeftSpeed( 30);
      break;
      
    case 'j':
    case 'J':
      JUMPER != JUMPER;


  //DebugLed
  pinMode(13, OUTPUT);

  //Init Jumper
  pinMode(JUMPER, INPUT);

  // Serial
  Serial.begin(9600);

  if (isGreen()) {
    digitalWrite(13, LOW);
  } else {
    digitalWrite(13, HIGH);
  }


  //  initializeTimer1();
}

void loop() {

  if (!endScript) {
    for (int i = 0; i < 2000; i++);
    Serial.println("DEBUT DE SCRIPT");
    Serial.println("Attente de Jumper...");
    while (!digitalRead(JUMPER));
    Serial.println("Debout!");
    prepareToStart();
    Serial.println("Retirer le jumper...");
    while (digitalRead(JUMPER));
    smoothSploch();
    Serial.println("Descente!");
    Serial.println("Calibrage en cours...");
    goBackward(35);
    delay(3000);
    stopMotors();

    goForward(30);
    delay(1800);
    goForward(1);
    delay(500);
    stopMotors();
    delay(1000);
    if (isGreen()) {
      rotateLeft();
    } else {
      rotateRight();
    }
    delay(1000);
    goBackward(60);
    delay(900);
    goBackward(1);
    delay(100);
    stopMotors();



    Serial.println("Calibrage OK!");


    endScript = true;
    Serial.println("FIN DE SCRIPT");
    while (42);
  }

}

// Serial
