Blynk.delay() function

What count’s as “well designed”, is it the amount of time it takes to perform a loop? Keeping it as low as possible?
If there is no need to call yield() with a well designed code, just out of curiosity, when does an “auto-yield” occur?

The ESP handles any pending events each time the loop() function completes, OR when delay() is called.

I wonder if we can put equal sign between “well designed” and “fluent program flow” :wink:

2 Likes

I read a detailed article on GitHub some months ago about the ESP’s WDT but I’m struggling to find it.

Having searched I believe the contributor was possibly @pasko-zh and he / she has an open pull request for updates to the ESP8266 Arduino readme.md including this graphical presentation


The full details of the pull request are at https://github.com/esp8266/Arduino/pull/2533/files
Useful WDT information, although not that easy to follow in a pull request.

1 Like

change
int end_time = millis() + milli;
to
long end_time = millis() + milli;

1 Like

Hi , I am using a ESP 32 and a ultrasonic sensor to activate a doll if some one comes near by. I also would like to activate from Iphone and Google Home. The doll activation needs a delay function between the activation and sensing due to mechanical stability. Blynk gets disconnected with the delay. I understand why. I am using python for the whole project. Do we have a code to incorporate delay function while stay connected with the Blynk. Once sensed or activated through blynk, I need about 2 mins of delay before the next activation. That is the time doll takes to come back to rest. If there is no sensing , the void loop can be run without delay. The issue comes when there is a sensing and the doll need to be activated.