Skip to content

Commit

Permalink
[#14] Added web server to main.cpp
Browse files Browse the repository at this point in the history
Signed-off-by: Clovis Durand <[email protected]>
  • Loading branch information
Clovel committed Dec 12, 2019
1 parent 3830d86 commit f1ee69d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions software/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
/* Global variables ------------------------------------ */
elec::Relay *gRelay = nullptr;
elec::Switch *gSwitch = nullptr;

WiFiManager *gWiFiMgr = nullptr;
WiFiServer *gServer = nullptr;

/* On-boot routine */
void setup(void) {
Expand All @@ -52,6 +54,10 @@ void setup(void) {
Serial.print("[BOOT ] IPv4 Address : ");
Serial.println(WiFi.localIP());

/* Set up web server */
gServer = new WiFiServer(80U);
gServer->begin();

/* End of setup */
Serial.println("[BOOT ] System booted !");
}
Expand Down

0 comments on commit f1ee69d

Please sign in to comment.