diff --git a/src/main.cpp b/src/main.cpp index 9a97708..43bb95b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -75,16 +75,17 @@ WiFiServer server(80); // port du serveur /// FONCTION CODE ERREUR /// //////////////////////////// -void errorCode(char codeNumber) { +void errorCode(int codeNumber) { while(1) { - //char i=0; - delay(4700); - for( int i=0 ; i=codeNumber ; ++i ){ - digitalWrite(LED, HIGH); - delay(300); - digitalWrite(LED, LOW); - delay(300); - } + delay(3700); + for( int i=1 ; i<=codeNumber ; ++i ){ + Serial.println("balise errCode Blink"); + delay(500); + digitalWrite(LED,HIGH); + delay(500); + digitalWrite(LED,LOW); + delay(500); + } } } @@ -293,10 +294,10 @@ void sd_init() { Serial.println("balise 01"); DateTime now = rtc.now(); fileName[0] = '/'; - fileName[1] = now.month(); - fileName[2] = now.day(); - fileName[3] = now.hour(); - fileName[4] = now.minute(); + fileName[1] = (now.month(),DEC); + fileName[2] = (now.day(),DEC); + fileName[3] = (now.hour(),DEC); + fileName[4] = (now.minute(),DEC); char entete[64] = "fichier de data"; writeFile(SD, fileName, entete); } @@ -451,7 +452,7 @@ void setup() { sd_init (); // initialisation de la carte SD pinMode(bouton_wifi, INPUT); // bouton wifi sem_wifi = false; // initialisation du sémaphore - pinMode(LED, OUTPUT); // LED bouton wifi et erreurs + pinMode(LED,OUTPUT); // LED bouton wifi et erreurs start_moteur(); // moteur /* compteur de pulsations */