John93
March 16, 2022, 6:54am
4
BLYNK _WRITE is a function called every time device gets an update of Virtual Pin value from the server or app.
You can use blynk timer to call your function, just create a void function like this
Void readsensor()
and in the void setup add this line
timer.setInterval(5000L, readsensor);
and in the void loop add
timer.run
More details here
Many users seem to struggle with the basic concepts of using BlynkTimer in their projects, despite the excellent discussions and tutorials that exist on this forum, so I thought I’d write a guide that will hopefully help clarify things. It’s rather long, as it attempts to explain the reasoning behind why and how we use timers, and covers some more advanced subjects, but I’ve tried to organise it in a way that helps people to find answers to specific questions…
Why use a timer at all?
Let’s say …