I have successfully used your example of OTA Updates for a sketch.
To save battery life, most if not all of my sketches use the code for sleeping.
Unfortunately, when the board is sleeping, I can’t figure out a way to send code to the board.
I’d appreciate any suggestions.
As always, thanks in advance,
Steve
You obviously wake the board either at regular intervals or on an external interrupt. At the end of the code run, just before going to sleep, send a “check for updates” request to a server and if the response is “Yes” (Or whatever you want), start the OTA update code.
Steve,
Thanks for your answer. I’d be greatly appreciative if you would send some sample code for a “check for updates” request to a server.
Thanks in advance,
Steve
I use IOTAppStory. It completely automates the OTA updates. I use the Preferences library to save the date. I check that the date is not today and then callHome().