WordClockESP/src/main.cpp

29 lines
562 B
C++
Raw Normal View History

#include <ESP8266React.h>
2021-03-06 22:06:09 +01:00
#include "ClockService.h"
#define SERIAL_BAUD_RATE 115200
AsyncWebServer server(80);
ESP8266React esp8266React(&server);
2021-03-06 22:06:09 +01:00
ClockService cservice = ClockService(&server, esp8266React.getSecurityManager());
void setup() {
2019-08-09 15:53:39 +01:00
// start serial and filesystem
Serial.begin(SERIAL_BAUD_RATE);
// start the framework and demo project
esp8266React.begin();
// load the initial light settings
2021-03-06 22:06:09 +01:00
cservice.begin();
2019-08-09 15:53:39 +01:00
// start the server
server.begin();
}
void loop() {
2019-08-09 15:53:39 +01:00
// run the framework's loop function
esp8266React.loop();
}