BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Blynk virtual function

Hello,

I have a function that is called by a timer at a fast rate.

Inside it i have a if statement. If the condition is satisfied, the following code runs only once.

So there is no problem/question of flooding the server. I have checked it.

My question is what is the time it takes to trigger
Blynk.virtual write/sync ?

Is it 100ms 500ms or 1sec ……

I am asking this question because there were some inconsistency in data being reflected in the app or web console.

I totally agree a bad coding practice would be the culprit. But when i reduce the timer frequency it seems to improve a bit(data being reflected on app).

So i was wondering is there any time frame for the virtual write/sync to get activated??

A great deal will depend on a large number of factors that can vary from one moment to another….
Local WiFi traffic, router response time, router to internet response time, number of hops for the data to get across the internet to the Blynk server, and all of the above in reverse as the response comes back.

The type and quality of your internet connection, and the physical distance to the Blynk cloud server that houses your project are probably the things that have the largest impact.

Turning-on debugging will show you when the requests are sent to the server and when the response comes back, and may help to shed some light on where the variations occur.

Pete.

1 Like

Thanks for the detailed explanation. This was something that i never knew. I will work on it.