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?
I moved your question into its own topic as is the prefered method.
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.
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
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.