Macro functions for using ESP8266 OTA (Over the Air) Update, including my usual setting of OTA
#include <MyOTA.h>
setup() {
... establish WiFi connection ...
setupMyOTA();
..
}
loop() {
loopMyOTA();
....
}
setupMyOTA()
should be called once, after WiFi connection is established.loopMyOTA()
must be called aftersetupMyOTA()
is called. It should be called repeatedly in short interval, to avoid losing OTA accesses.