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-28 11:36:43 +03:00
|
|
|
#include "serial.hpp"
|
2021-06-22 12:35:48 +03:00
|
|
|
|
|
|
|
|
|
|
|
const char* ssid = "fan_XXX";
|
|
|
|
|
|
|
|
void setup() {
|
2021-07-01 23:46:32 +03:00
|
|
|
Serial.begin(115200);
|
|
|
|
ota_setup(ssid);
|
2021-07-02 23:20:42 +03:00
|
|
|
server_setup();
|
2021-06-28 15:15:26 +03:00
|
|
|
collector_setup();
|
2021-06-28 11:36:43 +03:00
|
|
|
DEBUG_OUT.println(F("Setup done"));
|
|
|
|
DEBUG_OUT.print("IP address: ");
|
2021-07-01 23:46:32 +03:00
|
|
|
DEBUG_OUT.println(WiFi.softAPIP().toString());
|
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-07-02 23:20:42 +03:00
|
|
|
collector_loop();
|
2021-06-23 11:49:22 +03:00
|
|
|
}
|