Hi,
I am building an irrigation system.
after a few days of trying to debug the system Today, I realize that my NodeMCU board re-connect to the AP on average every 11:30 (between 11:24 to 11:45 min.) minutes. How to solve it? any suggestions?
the related code is
setup
{
WIFI_Connect();
}
loop
{
if (WiFi.status() != WL_CONNECTED)
{
WIFI_Connect();
updateState(2,2); // this function update thingspeak service with the status,
// I got every 11:30 min update.
}
}
void WIFI_Connect()
{
WiFi.disconnect();
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay ( 250 );
}
}