diff --git a/src/main.cpp b/src/main.cpp index f5a85ec..67c46a9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -266,57 +266,21 @@ void scribe_sd (){ appendFile(SD, fileName, horodatage); } -///////////////////////////// -/// FONCTIONS CODE ERREUR /// -///////////////////////////// +//////////////////////////// +/// FONCTION CODE ERREUR /// +//////////////////////////// void errorCode(char codeNumber) { - char i=0; - if(codeNumber == 1){ - delay(2000); - - digitalWrite(LED, HIGH); - delay(300); - digitalWrite(LED, LOW); - - } - if(codeNumber == 2){ + while(1) { + char i=0; delay(4700); - for(i=0; i=2; ++i){ - digitalWrite(LED, HIGH); - delay(300); - digitalWrite(LED, LOW); - delay(300); - } + for(i=0; i=codeNumber; ++i){ + digitalWrite(LED, HIGH); + delay(300); + digitalWrite(LED, LOW); + 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); - } - } - } /////////////////////