réduction de la fonction code erreur

This commit is contained in:
pgp 2021-01-18 13:47:36 +01:00
parent 15614f9f1d
commit 23fdc0cce1

View file

@ -266,57 +266,21 @@ void scribe_sd (){
appendFile(SD, fileName, horodatage); appendFile(SD, fileName, horodatage);
} }
///////////////////////////// ////////////////////////////
/// FONCTIONS CODE ERREUR /// /// FONCTION CODE ERREUR ///
///////////////////////////// ////////////////////////////
void errorCode(char codeNumber) { void errorCode(char codeNumber) {
char i=0; while(1) {
if(codeNumber == 1){ char i=0;
delay(2000);
digitalWrite(LED, HIGH);
delay(300);
digitalWrite(LED, LOW);
}
if(codeNumber == 2){
delay(4700); delay(4700);
for(i=0; i=2; ++i){ for(i=0; i=codeNumber; ++i){
digitalWrite(LED, HIGH); digitalWrite(LED, HIGH);
delay(300); delay(300);
digitalWrite(LED, LOW); digitalWrite(LED, LOW);
delay(300); delay(300);
}
} }
if(codeNumber == 3){
delay(4700);
for(i=0; i=3; ++i){
digitalWrite(LED, HIGH);
delay(300);
digitalWrite(LED, LOW);
delay(300);
}
} }
if(codeNumber == 4){
delay(4700);
for(i=0; i>=4; ++i){
digitalWrite(LED, HIGH);
delay(300);
digitalWrite(LED, LOW);
delay(300);
}
}
if(codeNumber == 5){
delay(4700);
for(i=0; i>=5; ++i){
digitalWrite(LED, HIGH);
delay(300);
digitalWrite(LED, LOW);
delay(300);
}
}
} }
///////////////////// /////////////////////