While (1) Blynk.run()


Im trying to add the ff commands in Virtual write to pause the device and later I can reset the device to run the initial code. While I would need more than 30secs for a pause that I have used the code below.
This cause my app to send notif that my device is disconnected.

while (1) Blynk.run()


while (1) loop()


  int end_time = millis() + num_of_delay;
  while (millis() < end_time)
    if (Blynk.connected())

all doesnt seems to work more than 30secs of pause, loops and/or delay.

I am running lib 0.5.4 on Espresso Live 2.0.

What exactly are you trying to accomplish? Stop the whole “device” (is that the correct term for running an Android dev application? or referring to an actual device…if so what one?) from processing or just disconnect Blynk processes for a duration? And why?

If you need assistance with the Espresso 2.0 program/process, then you need to ask there. If however you are trying to do something specifically involving a normal Blynk process, then please expand greatly on your information and needs.

Re-reading your post for the umpteenth time before calling it quits and going to sleep :sleeping:… I am thinking you want to stop Blynk for some reason, and for longer than 30 seconds, without the App saying the device is disconnected…

First off, it is easy enough to stop Blynk from processing with connection management commands… The whole basis of keeping a device running when losing server connection etc…

But short of spoofing it (the App) with another device running the same AUTH but benign code (AKA doing nothing but “being there”), the App WILL see that the device is offline and WILL report it as offline… period.

I am using Virtual pin (V1) to make the device pause in a loop

while (1) Blynk.run()


while (1) loop()

later on Ill send a command by another Virtual PIn V2 or another virtual V3 to reset it.

So basically, everything is done by virtual pins and blynk should always be running.
In V1, I use loop (with Blynk.run() inside it) to pause for more than 30secs, or even indefinitely until I send to V2 or V3.
But I am not sure why in the app (iOS) it is telling that my device is disconnected.
That means I cannot send V2 or V3.
How to remedy this?