mirror of https://github.com/jeelabs/esp-link.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
595 B
36 lines
595 B
9 years ago
|
#include "EspLink.h"
|
||
9 years ago
|
#include "WebServer.h"
|
||
9 years ago
|
#include "Pages.h"
|
||
9 years ago
|
|
||
|
const char ledURL[] PROGMEM = "/LED.html.json";
|
||
9 years ago
|
const char userURL[] PROGMEM = "/User.html.json";
|
||
9 years ago
|
const char voltageURL[] PROGMEM = "/Voltage.html.json";
|
||
9 years ago
|
|
||
|
const WebMethod PROGMEM methods[] = {
|
||
|
{ ledURL, ledHtmlCallback },
|
||
9 years ago
|
{ userURL, userHtmlCallback },
|
||
9 years ago
|
{ voltageURL, voltageHtmlCallback },
|
||
9 years ago
|
{ NULL, NULL },
|
||
|
};
|
||
|
|
||
|
WebServer webServer(Serial, methods);
|
||
|
|
||
|
void setup()
|
||
|
{
|
||
|
Serial.begin(57600);
|
||
|
webServer.init();
|
||
|
|
||
9 years ago
|
ledInit();
|
||
9 years ago
|
userInit();
|
||
9 years ago
|
voltageInit();
|
||
9 years ago
|
}
|
||
|
|
||
|
void loop()
|
||
|
{
|
||
|
webServer.loop();
|
||
|
|
||
9 years ago
|
ledLoop();
|
||
9 years ago
|
voltageLoop();
|
||
9 years ago
|
}
|
||
|
|