ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
example_wifi_userconfig.cpp
Go to the documentation of this file.
1#include <LittleFS.h>
2#include <WiFi.h>
3
4#include "config_server.hpp"
5
6const std::string AP_SSID = "ents";
7const std::string AP_PASSWORD = "changeme";
8
9void setup() {
10 Serial.begin(115200);
11 delay(1000);
12 WiFi.mode(WIFI_AP);
13 WiFi.softAP(AP_SSID.c_str(), AP_PASSWORD.c_str());
14 Serial.println("Access Point started");
15 Serial.print("IP Address: ");
16 Serial.println(WiFi.softAPIP());
17
18 if (!LittleFS.begin()) {
19 Serial.println("LittleFS mount failed");
20 return;
21 }
22
23 // Setup server
25 Serial.println("HTTP server started");
26}
27
28void loop() { handleClient(); }
void setupServer()
Setup webserver.
void handleClient()
Call to handle requests to the web server.
const std::string AP_SSID
void setup()
const std::string AP_PASSWORD