The difference between SimpleTimer and BlynkTimer

Pete, though it is an off topic but I have a question here. What is the difference between SimpleTimer & BlynkTimer? Why people add an additional header file instead of using BlynkTimer? What is the benefit of using SimpleTimer?

1 Like

I moved your question into its own topic as is the prefered method.

Doc - Introduction - Blynk Documentation


Basically , there is almost no difference… it is just now imbedded with a few “enhancements” made like allowing more timers (16) per referenced instance… and a few other internals that are mentioned in other topics… if I can find then I will link them here…



Thanks buddy. So, it is good practice to use BlynkTimer in blynk sketch.

So, there is a problem here in ur Important section. Thus, SimpleTimer is far better & more preferable for this scenario.

No… that notice implies the developers “fixed” (in BlynkTimer) an “issue” that is enherant in SimpleTimer.

However, it is an “issue” that may or may not affect non-Blynk uses as that library has been around a loooong time.

1 Like

Then which one should I used that will be perfect for any kind of condition.

BlynkTimer for all Blynk sketches, since it is built into the Blynk Library… It will work even when not connected to the server, if the rest of the sketch is programmed properly.

SimpleTimer for all other non-Blynk sketches… since, well, you have to use it, or some other form of timer library :stuck_out_tongue:


One more question. Can I use 20millisecond just like timer.setInterval(20L, myAnalogFunc);
Is that okay? Or it will create problem in the blynk server? What is the minimum calling time?

There is no problem with calling some function with milliseconds frequency (this depends on complexity of code naturally). But if such a timer will be used to send any data to Blynk server (i.e. virtualwrite) the serwer will disconnect due to flooding.

1 Like

Whenever i use Blynktimer over teh past 3 months, it causes blynk to disconnect every 5 minutes like clockwork across all my timer sketches. This even occurs in the sendsensor() example off the blynk website with a timer anywhere from 50s to 10min.
I have set up a reconnect function, and it indicates the reconnect will occur on first attempt each time.
Since I have no timers in my sketches which run at this frequency, are there server-side checks which occur every 300 seconds which may cause this?

I think we need to see your code.