Hello when the router restart after a power restart the arduino go up before the internet connection.
So in the monitor i see that the process is stopped in this point without errore messages:
Blynk.begin(auth, wifi, ssid, pass);
This force me to restart Arduino by power supply, after (with internet on) goes fine and it is connected.
I use a wifi connection by a esp8266 shield connected with a Arduino mega on Serial1 pins.
How can use one timeout with this library BlynkSimpleShieldEsp8266.h, so when there is not connection the process works the same without blynk?
//#define BLYNK_DEBUG // debugga
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "d8985243xxxxx8d40fba31ec5c3c1";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Vodafone-33734410";
char pass[] = "wifidixxxerrebecca";
#define EspSerial Serial1
#define ESP8266_BAUD 9600
ESP8266 wifi(&EspSerial);
void setup()
{
// Set console baud rate
Serial.begin(9600);
delay(10);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
}
void loop()
{ Blynk.run();
}