   
   y=0;
   i=-1;
+  
+  pinMode(pinLeftMotor,OUTPUT);
+  pinMode(pinRightMotor,OUTPUT);
 }
 
 void loop() {
-  if (periode>1600){
+  if (periode>1600000){
     voltmetre();
     periode=0;
     //Serial.println("loop");
   }
   
+  if (mode == MODE_TANK) {
+    softPWM(pinLeftMotor,puissance[0]);
+    softPWM(pinRightMotor,puissance[1]);
+  } 
   while (Serial.available()){
 
       int c=Serial.read();
       if(c==250) {
          Serial.println(" ");
          i=0; 
+         mode = MODE_BRAS
+      }
+      if(c==254) {
+         Serial.println(" ");
+         i=0; 
+         MODE = MODE_TANK:
       }
       /*if(c==65) { //MODE 1
         glowingLED(30);

    Serial.println("ON");
  }
  else {
    if ( currentMicros - previousMicros <= period) {
      digitalWrite(pin, LOW);
      Serial.println("OFF");    
    }

/****************************************************************
*                Ecriture série des valeurs servos              *
****************************************************************/
#define MODE_BRAS 0
#define MODE_TANK 1
int mode = MODE_BRAS;

        //SERVOS 
#include <Servo.h>
int i=-1;
int y=0;
const int nbrServos=6;                              //Nombre de servomoteurs
const int brocheServo[nbrServos]={3,5,6,9,13,11};   //Choix des broches pour les servomoteurs 3 5 6 9 10 11
int angle[nbrServos];
const int angle0[nbrServos]={90,180,0,90,180,90}; //90 0 180 180 90
Servo servo[nbrServos];

//Servo 2 : angle+ = montée : OK
