does anyone here knows how to solve this?
basically im trying to deploy a web server in my ESP32 DevKit V1
but as you can see in Serial Monitor it always spamming "..........." infinitely. according to one commen there the problem is incorrect SSID and Password but i even try to copy paste the entire code but it seems it is not working.(see code below)
i even tried to use the example code of wifi from File > Example > WiFi > WiFiClient but it also doesn't work. so i assume the Wifi.h has a problem but i could be wrong.(2)
however i tried to use another WiFi example code File>Example>WiFi> WiFi accesspoint and it works. idk what is the problem of the first code(3) idk why my first nd 2nd attempt doesnt work but this one is working
My board is ESP 32 DevKit V1 and the Board in my Arduino IDE is DOIT ESP32 DEVKIT V1
source code of my first attempt:
#include <WiFi.h>
// Replace with your network credentials
const char* ssid = "LeoUser";
const char* password = "pass123";
// Set web server port number to 80
WiFiServer server(80);
// Variable to store the HTTP request
String header;
// Auxiliar variables to store the current output state
String output26State = "off";
String output27State = "off";
// Assign output variables to GPIO pins
const int output26 = 26;
const int output27 = 27;
// Current time
unsigned long currentTime = millis();
// Previous time
unsigned long previousTime = 0;
// Define timeout time in milliseconds (example: 2000ms = 2s)
const long timeoutTime = 2000;
void setup() {
Serial.begin(115200);
// Initialize the output variables as outputs
pinMode(output26, OUTPUT);
pinMode(output27, OUTPUT);
// Set outputs to LOW
digitalWrite(output26, LOW);
digitalWrite(output27, LOW);
// Connect to Wi-Fi network with SSID and password
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
// Print local IP address and start web server
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
server.begin();
}
source: