WordClockESP/src/main.cpp
2019-08-10 12:35:26 +01:00

33 lines
640 B
C++

#include <ESP8266React.h>
#include <DemoProject.h>
#include <FS.h>
#define SERIAL_BAUD_RATE 115200
AsyncWebServer server(80);
ESP8266React framework(&SPIFFS);
DemoProject demoProject = DemoProject(&SPIFFS, framework.getSecurityManager());
void setup() {
// start serial and filesystem
Serial.begin(SERIAL_BAUD_RATE);
SPIFFS.begin();
// set up the framework
framework.init(&server);
// begin the demo project
demoProject.init(&server);
// start the server
server.begin();
}
void loop() {
// run the framework's loop function
framework.loop();
// run the demo project's loop function
demoProject.loop();
}