Hello Guys, I’m a new Blynker and perform a project which uses timer.
Something’s wrong with it but do not discover what it is, so I request your help. In the sketch I have a counterdown (ct_down function) which is updated by the timer looking like below.
IDE gives “error” message for any Reason. It works for clockDisplay function but not for ct_down function.
Thank you in advance for your help.
void ct_down(int x_start) {
while (x_start > 0)
x_start--;
}
void setup(){
// Debug console
Serial.begin(9600);
Serial.println("... ESP restarted ... ");
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print( "." );
}
//Begin synchronizing time
timeClient.begin();
//*****************************************************************
// Other Time library functions can be used, like:
// timeStatus(), setSyncInterval(interval)...
// Read more: http://www.pjrc.com/teensy/td_libs_Time.html
//*****************************************************************
//setSyncInterval(10 * 60); // Sync interval in seconds (10 minutes)
// Display digital clock every 1 seconds
timer.setInterval(1000L, clockDisplay); //Timer update the function each 1s
timer.setInterval(1000L, ct_down); //Timer update the function each 1s ***************************************rechercher la cause de non fonctionnement de la tempo
//timer.setInterval(10000L, clockMachining);//RTC clock update interval
}