These are rather vague issues. It would be good to understand EXACTLY what errors occur and in which situations.
The segment of code you’ve posted doesn’t really help, because it’s calling functions that don’t exist, and what happens inside these functions could have an impact on your Blynk connection.
When the device boots it creates an Always On connection to the Blynk server, and there two need to exchange handshake/heartbeat data on a regular basis.
This heartbeat only happens when Blynk.run() is executed
In addition, for the BLYNK_WRITE(vpin) callback function to be recognised and processed, Blynk.run() needs to be executed.
If your timed functions are taking too long to execute then the connection to Blynk can timeout.
Also, you have two timers that are being called at exactly the same frequency. As your MCU can’t multitask, these are effectively executed immediately after on another.
More on timers here…
If you want to implement deepsleep then you’ll need a very different code structure to the one you currently have, and it makes no sense to use timers in that situation. Generally, you’d want to do something like this…
Wake up
Connect to WiFi
Connect to Blynk
Wait until Blynk.syncVirtual(V0) has executed
Take readings
Go to sleep
You’ll notice that I refer to connecting to WiFi and connecting to Blynk as separate actions.
Blynk.begin() is a blocking function, and if it can’t create a connection to either WiFi or the Blynk server then all code execution will stop at that point. This means that your device will never reach the deepsleep code, and stay awake until your battery is exhausted.
A better alternative is to manually manage your WiFi connection then use Blynk.config() and Blynk.connect() instead of Blynk.begin().
Pete.