32 lines
523 B
C++
32 lines
523 B
C++
#include <Arduino.h>
|
|
#include "simpleota.h"
|
|
|
|
|
|
void setup() {
|
|
Serial.begin(115200);
|
|
|
|
Serial.println();
|
|
Serial.println("Initializing");
|
|
|
|
checkOTA();
|
|
if(initOTA()) { //initialize ota if ota enabled
|
|
return; //if ota do nothing else for setup
|
|
}
|
|
Serial.println("Booting normal");
|
|
|
|
}
|
|
|
|
|
|
void loop() {
|
|
if (loopOTA()) {
|
|
return; //just wait for ota
|
|
}
|
|
|
|
static unsigned long last_print=0;
|
|
if (millis()-last_print>1000) {
|
|
last_print=millis();
|
|
Serial.println("Loop");
|
|
}
|
|
|
|
}
|