Some hostname testing

This commit is contained in:
tablatronix
2020-05-08 23:31:02 -05:00
parent 293f705b0f
commit 5aebb1dd51
4 changed files with 135 additions and 81 deletions
@@ -6,6 +6,13 @@
*/
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
// include MDNS
#ifdef ESP8266
#include <ESP8266mDNS.h>
#elif defined(ESP32)
#include <ESPmDNS.h>
#endif
// select which pin will trigger the configuration portal when set to LOW
#define TRIGGER_PIN 0
@@ -20,11 +27,21 @@ void setup() {
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
// put your setup code here, to run once
Serial.begin(115200);
Serial.setDebugOutput(true);
delay(1000);
Serial.println("\n Starting");
pinMode(TRIGGER_PIN, INPUT_PULLUP);
// wm.resetSettings();
wm.setHostname("MDNSEXAMPLE");
// wm.setEnableConfigPortal(false);
// wm.setConfigPortalBlocking(false);
wm.autoConnect();
}
void loop() {
MDNS.update();
doWiFiManager();
// put your main code here, to run repeatedly:
}