Last active
May 16, 2019 03:50
-
-
Save fitorec/597e68345ca605807a0d446fee0443b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**/ | |
#include <Arduino.h> | |
#include <libb64/cencode.h> | |
#include <ESP8266WebServer.h> | |
#include "MyWebServer.h" | |
ESP8266WebServer server(80); | |
void urlHome(){ | |
server.send(200, "text/plain", "<h1>works</h1>"); | |
} | |
MyWebServer::MyWebServer(){ | |
setup(); | |
} | |
void MyWebServer::setup() { | |
server.on("/", urlHome); | |
// others callbacks URL handle binds | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MyWebServer_H | |
#define MyWebServer_H | |
#include <ESP8266WebServer.h> | |
void urlHome(); | |
class MyWebServer | |
{ | |
public: | |
MyWebServer(); | |
void setup(); | |
}; | |
#endif //MyWebServer_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "MyWebServer.h"; | |
void setup() { | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment