diverses modifications, debug
This commit is contained in:
parent
c33d69fa16
commit
e7e375ec74
29
src/main.cpp
29
src/main.cpp
|
@ -75,16 +75,17 @@ WiFiServer server(80); // port du serveur
|
||||||
/// FONCTION CODE ERREUR ///
|
/// FONCTION CODE ERREUR ///
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
|
|
||||||
void errorCode(char codeNumber) {
|
void errorCode(int codeNumber) {
|
||||||
while(1) {
|
while(1) {
|
||||||
//char i=0;
|
delay(3700);
|
||||||
delay(4700);
|
for( int i=1 ; i<=codeNumber ; ++i ){
|
||||||
for( int i=0 ; i=codeNumber ; ++i ){
|
Serial.println("balise errCode Blink");
|
||||||
digitalWrite(LED, HIGH);
|
delay(500);
|
||||||
delay(300);
|
digitalWrite(LED,HIGH);
|
||||||
digitalWrite(LED, LOW);
|
delay(500);
|
||||||
delay(300);
|
digitalWrite(LED,LOW);
|
||||||
}
|
delay(500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,10 +294,10 @@ void sd_init() {
|
||||||
Serial.println("balise 01");
|
Serial.println("balise 01");
|
||||||
DateTime now = rtc.now();
|
DateTime now = rtc.now();
|
||||||
fileName[0] = '/';
|
fileName[0] = '/';
|
||||||
fileName[1] = now.month();
|
fileName[1] = (now.month(),DEC);
|
||||||
fileName[2] = now.day();
|
fileName[2] = (now.day(),DEC);
|
||||||
fileName[3] = now.hour();
|
fileName[3] = (now.hour(),DEC);
|
||||||
fileName[4] = now.minute();
|
fileName[4] = (now.minute(),DEC);
|
||||||
char entete[64] = "fichier de data";
|
char entete[64] = "fichier de data";
|
||||||
writeFile(SD, fileName, entete);
|
writeFile(SD, fileName, entete);
|
||||||
}
|
}
|
||||||
|
@ -451,7 +452,7 @@ void setup() {
|
||||||
sd_init (); // initialisation de la carte SD
|
sd_init (); // initialisation de la carte SD
|
||||||
pinMode(bouton_wifi, INPUT); // bouton wifi
|
pinMode(bouton_wifi, INPUT); // bouton wifi
|
||||||
sem_wifi = false; // initialisation du sémaphore
|
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
|
start_moteur(); // moteur
|
||||||
|
|
||||||
/* compteur de pulsations */
|
/* compteur de pulsations */
|
||||||
|
|
Loading…
Reference in a new issue