WordClockESP/src/main.cpp

35 lines
745 B
C++
Raw Normal View History

2019-07-14 21:13:26 +00:00
#include <ESP8266React.h>
#include <DemoProject.h>
#include <FS.h>
#define SERIAL_BAUD_RATE 115200
AsyncWebServer server(80);
ESP8266React esp8266React(&server, &SPIFFS);
DemoProject demoProject = DemoProject(&server, &SPIFFS, esp8266React.getSecurityManager());
void setup() {
2019-08-09 14:53:39 +00:00
// start serial and filesystem
Serial.begin(SERIAL_BAUD_RATE);
// start the file system (must be done before starting the framework)
SPIFFS.begin();
// start the framework and demo project
esp8266React.begin();
// start the demo project
demoProject.begin();
2019-08-09 14:53:39 +00:00
// start the server
server.begin();
}
void loop() {
2019-08-09 14:53:39 +00:00
// run the framework's loop function
esp8266React.loop();
2019-07-14 21:13:26 +00:00
2019-08-09 14:53:39 +00:00
// run the demo project's loop function
2019-07-14 21:13:26 +00:00
demoProject.loop();
}