        myservo.detach(); 
        Repos=1;
       }
- dbg="a" + String(CompteurRepos) + "a" + String(ActionBouche) + "b" + String(BoucheStatus);
- Serial.println(dbg);
+ //dbg="a" + String(CompteurRepos) + "a" + String(ActionBouche) + "b" + String(BoucheStatus);
+ //Serial.println(dbg);
 CompteurRepos+=1;    
 delay(1);
     

        myservo.attach(servoPin);
        delay(1);
        }
      //Serial.println(val);
      ActionBouche = 1;
      //myservo.attach(9);
      delay(10);
      
     
      myservo.write(100);
      
      CompteurRepos=0;
      delay(100);
      
      }
      if (BoucheStatus == 1 && ActionBouche == 1)


Servo myservo;                 

int     MIN = 10; 
int     SecondDetection = 2; // 
int     val = 0;     // variable to store the read value
int     i = 0;
int     posMax = 75;    // variable to store the servo position
int     posMin = 50;
int     MouthTimer = 20; 
int     BoucheStatus = 0;
int     ActionBouche = 0;
int     Repos = 0;
