Connects sporadically and is not stable at all. TIMER problem. If I remove timer stuff it works

Did you do this? A screenshot of your datastreams screen would be a good starting point.

In the short term maybe, you’ll be back asking questions about why your device randomly disconnects from Blynk and won’t re-connect without a physical reset soon though, and the answer will be the delays you are using.

Strange how tens of thousands of other Blynk users disagree, and millions of SimpleTimer users also disagree :thinking:

You have some flaws in your code structure.
The sensible approach would be to use a timer to call a function which takes readings from your sensors, applies the logical tests to them and then pushes the results to Blynk. Instead, that is spread across two functions, called with timers which are set to coincide at precisely the same time - yet you’re doing this on a board which doesn’t support multi-threading.

When it comes to debugging programming issues, the serial print command is your most powerful tool, but I don’t see it being used to try to gather clues about where the problem may lie.

Anyway, I’ll mark this topic as solved but leave it open for further comments.
When you decide that you want to re-visit the issue please continue the conversation here, rather than creating a new topic.

Pete.

Only using virtual pins. Not using any digital pin.

Look at the code I sent before… Just uncomment the BlynkTimer timer declaration line, and it doesn’t connect to blynk. Leaving every other Timer line commented. Just uncommenting line 10. That for me is totally weird. Only declaring a Timer object causes Blynk not to connect…

I’ll try again to make Timer work. But simply making a code that connects to blynk and runs a timer doesn’t work for me. Googled every example and yet couldn’t make it work.

Thanks again
Manuel

Maybe you have a problem with your library installation.

Pete.

Got the latest version available on Arduino IDE.

But is every file correctly installed and un corrupted, and is the SimpleTimer installation okay?

Pete.

How can I check that?

A fresh IDE install and library installs is the most radical approach, but deleting and re-installing the various libraries usually does the trick.

Pete.