Blynk halting my Arduino during internet drop

I have an Arduino Mega with some pumps on that are time activated via the Blynk RTC widget. The pumps then shut off a varying time after using Millis.

The problem is that during testing I waited for the pumps to turn on, then I pulled the internet connection therefore disconnecting Blynk. Serial monitor showed it was disconnected however it halted the Arduino itself which meant the pumps did not shut off. I cannot have this happen hence all my testing of all situations.

Is there anyway I can Keep the Arduino running even if the Internet drops connection? I imagine t would be a similar situation with a flood error.

How does the Mega connect to the server?

Study this thread Brown outs or reboots

Sorry, it’s via an Ethernet shield.

This is typically handled by Blynk’s Connection Management commands… however they are really only meant for ESP based devices… for example the primary Blynk.config() command doesn’t like to work with the required libraries needed for Arduino with ESP shield connections… not sure about with Ethernet shields though.

OK with Ethernet.

1 Like