1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #include <FS.h>
- #include <WiFiManager.h>
-
- void setup() {
-
- Serial.begin(115200);
- Serial.println();
-
-
- WiFiManager wifiManager;
-
-
-
-
-
-
-
-
-
-
-
- IPAddress _ip = IPAddress(10, 0, 1, 78);
- IPAddress _gw = IPAddress(10, 0, 1, 1);
- IPAddress _sn = IPAddress(255, 255, 255, 0);
-
-
- wifiManager.setSTAStaticIPConfig(_ip, _gw, _sn);
-
-
-
-
- if (!wifiManager.autoConnect("AutoConnectAP", "password")) {
- Serial.println("failed to connect, we should reset as see if it connects");
- delay(3000);
- ESP.restart();
- delay(5000);
- }
-
- Serial.println("connected...yeey :)");
- Serial.println("local ip");
- Serial.println(WiFi.localIP());
- }
- void loop() {
-
- }
|