esp_ota_example/src/simpleota.h

29 lines
523 B
C
Raw Normal View History

2022-07-25 10:53:27 +00:00
#ifndef simpleota_h
#define simpleota_h
2022-07-25 11:16:07 +00:00
#include <Arduino.h>
#include <WiFi.h>
#include <ArduinoOTA.h>
#define OTA_WIFI_SSID "Chaos-West temp alternative"
#define OTA_WIFI_PASSWORD ""
2022-07-25 11:59:05 +00:00
#define OTA_WAIT_TIMEOUT 20 // in 0.1s increments -> 10s
2022-07-25 11:31:12 +00:00
#define OTA_PASSWORD "MCH2022OTA" //password needed for ota flashing
2022-07-25 11:16:07 +00:00
void checkOTA();
bool initOTA();
bool loopOTA();
enum OTA_MODE {
NONE,
SEARCHING,
WAITING,
UPDATING
};
extern OTA_MODE otaMode;
extern uint16_t otaWaitCounter;
2022-07-25 10:53:27 +00:00
#endif