AP Web Server
Posted: Sat Sep 30, 2017 3:41 pm
Hi,
I m doing an IOT thermostat.
I would like to update temperature value while there is no client connected. I make a thermostat() function called in the loop before creating WifiClient object. But the AP wifi doesn t show up or it s impossible to get connected to it.
I checked over the internet during hours whitout success.
I could called thermostat() function in setup and doing a ESP.reset() when there is no client connected but it s so dirty.
Any held would be appreciate
Thanks
Morgan
I m doing an IOT thermostat.
Code: Select all
WiFiServer server(80);
void setup()
{
initHardware();
setupWiFi();
server.begin();
}
void loop()
{
thermostat();
// Check if a client has connected
WiFiClient client = server.available();
if (!client) {
return;
}
....
}
void thermostat(){
//checking if the actual temperature is not higher than the temperature sets by the user. If so, heating start through a rele
}
I would like to update temperature value while there is no client connected. I make a thermostat() function called in the loop before creating WifiClient object. But the AP wifi doesn t show up or it s impossible to get connected to it.
I checked over the internet during hours whitout success.
I could called thermostat() function in setup and doing a ESP.reset() when there is no client connected but it s so dirty.
Any held would be appreciate
Thanks
Morgan