Hello together,
I’m in Spain right now and wanted to try out my first old prgramm with the new app.
Everything worked in Germany, but here in Spain Blynk does not connect.
Output on the serial monitor:
[3829] Connecting to blynk.cloud:80
[9832] Connecting to blynk.cloud:80
WiFi.status() says 3
Ping
Ping is executed for blynk-cloud.com [139.59.206.133] with 32 bytes of data:
Response from 139.59.206.133: Bytes=32 Time=53ms TTL=47
Response from 139.59.206.133: Bytes=32 Time=99ms TTL=47
Reply from 139.59.206.133: Bytes=32 Time=57ms TTL=47
Reply from 139.59.206.133: Bytes=32 Time=55ms TTL=47
Here is the code for Wifi
void MyWiFi() {
int mytimeout = millis() / 1000;
WiFi.config(arduino_ip, dns_ip, gateway_ip, subnet_mask);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
if ((millis() / 1000) > mytimeout + 2) {
break;
}
}
// delay(100);
//Blynk.config(auth, "blynk-cloud.com", 80); //Blynk.begin(auth, ssid, pass);
// Blynk.config(auth, "blynk.cloud", 80);
Blynk.config(auth);
mytimeout = millis() / 1000;
while (Blynk.connect() == false) {
if ((millis() / 1000) > mytimeout + 3) {
break;
}
}
}
If the Wifi connection is interrupted or not available, the execution of the programme should not be stopped.
This code has worked wonderfully so far, only the connection to Blynk was established with Blynk.config(auth, “blynk.cloud”, 80);.
It would be great if someone could help me.
Many greetings Uwe