performs an rtc.begin to get the current time from the server (for the timestamp in the table).performs an if check against the counter which will make the device deepsleep if the counter reaches a present limit.increments a counter to count how many times the void loop is executed.Connect to Blynk via GSM, using nfig/nnect so it’s non-blocking.I ended-up structuring my code as follows… The device then goes back to sleep for another few hours. A table widget is updated with either a “no action” or “rebooted” message and a timestamp. If the button is on then an action is taken (a relay is toggled to reboot a device), and the app button is set to off again. The project is designed to wake-up every few hours, establish a GSM connection to the Blynk cloud server then check the status of an app button connected to pin V1. Okay, as a follow-up to my previous post I was going to include my code, but I think it might be easier if I simply explained what my project is supposed to do, and how I’ve structured my code (and why). T_httpUpdate_return ret = ESPhttpUpdate.update(wifiClient, fwWebServer, 80, fwBinUrl) Serial.printf("Updating to firmware %ld from ", srvFwVersion) While (WiFi.status() != WL_CONNECTED
0 Comments
Leave a Reply. |