   }  
 }
 
+void changeDirection(char Direction,bool level) {
+  if (Direction == 'left') digitalWrite(pinRightDirection, level);
+  else digitalWrite(pinLeftDirection, level);
+ } //A utiliser comme suit : changeDirection('left',HIGH);

  
  pinMode(pinLeftMotor,OUTPUT);
  pinMode(pinRightMotor,OUTPUT);
}

void loop() {
  if (periode>1600000){
    voltmetre();
    periode=0;
    //Serial.println("loop");
  }
  

      }
  
  } 
  period++;
 }
 
 
