2021-06-20 12:57:47 +03:00
|
|
|
#include <Arduino.h>
|
|
|
|
|
2021-06-22 15:51:58 +03:00
|
|
|
#include "ota.hpp"
|
2021-06-23 16:44:37 +03:00
|
|
|
#include "server.hpp"
|
2021-06-27 21:46:11 +03:00
|
|
|
#include "collector.hpp"
|
2021-06-22 12:35:48 +03:00
|
|
|
|
|
|
|
|
|
|
|
const char* ssid = "fan_XXX";
|
|
|
|
|
2021-06-23 16:44:37 +03:00
|
|
|
|
2021-06-22 12:35:48 +03:00
|
|
|
void setup() {
|
|
|
|
Serial.begin(115200);
|
2021-06-22 15:51:58 +03:00
|
|
|
ota_setup(ssid);
|
2021-06-23 16:44:37 +03:00
|
|
|
server_setup();
|
2021-06-27 21:46:11 +03:00
|
|
|
Serial.println(F("Setup done"));
|
|
|
|
Serial.print("IP address: ");
|
|
|
|
Serial.println(WiFi.softAPIP());
|
2021-06-20 12:57:47 +03:00
|
|
|
}
|
|
|
|
|
2021-06-22 12:35:48 +03:00
|
|
|
void loop() {
|
|
|
|
ArduinoOTA.handle();
|
2021-06-27 21:46:11 +03:00
|
|
|
server_loop();
|
2021-06-27 22:12:14 +03:00
|
|
|
collector_loop();
|
2021-06-23 11:49:22 +03:00
|
|
|
}
|