WordClockESP/src/main.cpp

37 lines
808 B
C++
Raw Normal View History

#include <ESP8266React.h>
2021-03-06 22:06:09 +01:00
#include "ClockService.h"
#include "InformationService.h"
#define SERIAL_BAUD_RATE 115200
// version info
#define VERSION "v0.1.0"
AsyncWebServer server(80);
ESP8266React esp8266React(&server);
2021-03-06 22:06:09 +01:00
//ClockService cservice = ClockService(&server, esp8266React.getSecurityManager());
InformationService iservice = InformationService(&server, esp8266React.getSecurityManager());
void setup() {
2019-08-09 15:53:39 +01:00
// start serial and filesystem
Serial.begin(SERIAL_BAUD_RATE);
Serial.printf("Starting WordClock %s\n", VERSION);
// start the framework and demo project
esp8266React.begin();
// load the initial light settings
// cservice.begin();
iservice.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();
}