I followed this example, and changed the ssid and password: ESP32 Arduino HTTP server: Getting query parameters - techtutorialsx
However, after it is uploaded to the ESP32, and the serial monitor is changed to 115200 baud, it just continually prints, "Connecting to WiFi.." without stopping to give any address. Is there something I'm doing wrong? How might this be fixed?
#include "WiFi.h"
#include "ESPAsyncWebServer.h"
const char* ssid = "Wireless Controller";
const char* password = "12345678";
AsyncWebServer server(80);
void setup()
{
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(1000);
Serial.println("Connecting to WiFi..");
}
Serial.println('\n');
Serial.println(" \\/ ");
Serial.println(" \\/ ");
Serial.println(" \\/ ");
Serial.println(WiFi.localIP());
Serial.println("/\\");
Serial.println("/\\");
Serial.println("/\\");
Serial.println('\n');
server.on("/", HTTP_GET, [](AsyncWebServerRequest * request)
{
int paramsNr = request->params();
Serial.println(paramsNr);
for (int i = 0; i < paramsNr; i++)
{
AsyncWebParameter* p = request->getParam(i);
Serial.print("Param name: ");
Serial.println(p->name());
Serial.print("Param value: ");
Serial.println(p->value());
Serial.println("------");
}
request->send(200, "text/plain", "message received");
});
server.begin();
}
void loop() {}
I also press the "EN" button. The same results.