ESP8266 wifi shield with Blynk: Program stops when wifi connection unsuccessful


I successfully connected my Arduino Mega to Blynk using an ESP8266 (and tried to pass on my learnings via a hackster tutorial)

I used the following libraries:
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

Blynk is now connecting mostly successfully when the Arduino is running through the “Setup” mode.

My problem is the following: In case the connection is not successful, I can read the program feedback “connection unsuccessful” by Blynk in the serial monitor - however the program stops. Ideal behavior would be that the program continues to run (and ideally that I could program into the Arduino loop an occasional additional connection attempt). I assume this would require a change of the library?

Thanks for your help


Blynk.begin() is a blocking routine… no connection no run.

Try Blynk.config() with prior WiFi connection and reconnection routines…