mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-22 02:32:10 +10:00
added initialisation to setup so wifi is no longer global and it gets cleaned
dnsServer and webServer are also no longer global readme updated
This commit is contained in:
@@ -6,15 +6,15 @@
|
||||
#include <DNSServer.h>
|
||||
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager
|
||||
|
||||
//this intitilises the library, parameter is eeprom start
|
||||
WiFiManager wifi;
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(115200);
|
||||
|
||||
|
||||
|
||||
//WiFiManager
|
||||
//Local intialization. Once its business is done, there is no need to keep it around
|
||||
WiFiManager wifi;
|
||||
|
||||
//fetches ssid and pass from eeprom and tries to connect
|
||||
//if it does not connect it starts an access point with the specified name
|
||||
//here "AutoConnectAP"
|
||||
@@ -28,4 +28,4 @@ void setup() {
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user