BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Adding Blynk.connected() the app causing load on the server..... Solution plz

“apiCode” & “Server_ip” are the values from EEPROM. Only thing I need is to check that my “nodeMCU” is connected. But when I am using this code in “void loop()” of 3 or 4 nodemcu it cause load on the server

void loop(){
if (Blynk.connected()) {
    timer.run();
    Blynk.run();
    }
  }
  else {
    Blynk.config(apiCode, Server_ip, 8080);
    Blynk.connect();
  }
}

Please edit your post and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

Вот здесь


Пример №9
Все отлично работает

is it related to my problem… If it is then I didn’t understand how

В loop() нужен
timer.setTimeout(30000L, { // Lambda Reconnection Timer Function …

Blynk.connect() НЕ НУЖНО постоянно дергать !!! Надо время для связи с сервером !

have you tried this?? This helped for me??

char pass[] = "***********";
char server[] = "###.###.##.###";   // ip adres
int port = 8080;

void setup()
{
Blynk.begin(auth, wifi, ssid, pass, server, port );
}

yes but I wants to run my program when its connected to server

{
  
  Blynk.begin(auth, ssid, pass, IPAddress(???,???,?,???), 8080);

  while (Blynk.connect() == false) {
    // Wait until connected
  }
}

// the Ip address doesnt work with the example before… but maybe this will help?