reworking examples

This commit is contained in:
Shawn A
2018-06-28 12:53:36 -05:00
parent 8f2791f908
commit 9917f619b3
13 changed files with 271 additions and 236 deletions
+31
View File
@@ -0,0 +1,31 @@
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
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 wm;
//reset settings - wipe credentials for testing
//wm.resetSettings();
//set custom ip for portal
//wm.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));
//automatically connect using saved credentials if they exist
//If connection fails it starts an access point with the specified name
//here "AutoConnectAP" if empty will auto generate basedcon chipid, if password is blank it will be anonymous
//and goes into a blocking loop awaiting configuration
wm.autoConnect("AutoConnectAP");
//or use this for auto generated name ESP + ChipID
//wm.autoConnect();
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
}
void loop() {
// put your main code here, to run repeatedly:
}