int time = slide1*1000;
int start=millis();
while(millis()-start <= time){
Serial.println("print");
Blynk.run();
}
Serial.println("finished");
Slide1 is a component on my phone app, I want to cycle until while time limit is > than that I catch from the app ( I didn’t post more code because it works) with a slide
With this code, the loop never stops but if I change the variable slide1 with a fixed time ( for example 30000) , it works perfectly .
It is not a recursive operation, it is a function that moves a motor until it opens a window, how can I use a timer if this operation is not needed every time?
Did you read the Timeout Timers section of the topic I linked to?
This type of timer can be triggered when required and used as a one-shot timer, which seems to be exactly what you require.