Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <WiFi.h>
- #include <WebServer.h>
- #include <DNSServer.h>
- #include <WiFiManager.h>
- #define TRIGGER_PIN 4
- void setup() {
- Serial.begin(115200);
- Serial.println("\n Starting");
- pinMode(TRIGGER_PIN, INPUT);
- }
- void loop() {
- if ( digitalRead(TRIGGER_PIN) == LOW ) {
- WiFiManager wifiManager;
- if (!wifiManager.startConfigPortal("ESP32Wifi","12345678")) {
- Serial.println("failed to connect and hit timeout");
- delay(3000);
- ESP.reset();
- delay(5000);
- }
- Serial.println("connected...yeey :)");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment