I was creating a simple Web Server for ESP32s2, I compile and upload it, but the board didn't run the code. I suposse that the library isn't well defined or I'm doing something wrong.
#include <WiFi.h>
#include <ESPAsyncWebServer.h>
#define LED_PIN 15
// Configurar WiFi
const char *ssid = "TU_SSID";
const char *password = "TU_PASSWORD";
// Crear servidor en el puerto 80
AsyncWebServer server(80);
void setup() {
pinMode(LED_PIN, OUTPUT);
Serial.begin(115200);
// Conectar a WiFi
WiFi.begin(ssid, password);
Serial.print("Conectando a WiFi");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println();
Serial.print("Conectado! IP: ");
Serial.println(WiFi.localIP());
// Ruta raĆz "/"
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(200, "text/plain", "Hola desde ESP32-S2 Mini!");
});
// Iniciar servidor
server.begin();
Serial.println("Servidor iniciado.");
}
void loop() {
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN, LOW);
delay(1000);
}
PaulRB
September 9, 2025, 1:09pm
2
How do you know that?
As a beginner, you can safely assume you did something wrong and the library is ok.
sonofcy
September 9, 2025, 1:10pm
3
What does that mean?
Post the serial log output in code tags.
Also show us the screen you see when you goto the ip created.
The wifi signal didn't appear and the light of the board didn't turn on. Searching about it, the library is not compatible at all with the ESP32s2 mini, so i think that it can be something related with the dependences
PaulRB
September 9, 2025, 1:16pm
5
How do you know that?
Are you expecting the ESP to appear as a new access point? ESP can do that, but your code does not set this up.
PaulRB
September 9, 2025, 1:18pm
6
It could be stuck trying to connect to your router. Serial monitor will show this. If so, check the SSID and password is correct.
sonofcy
September 9, 2025, 1:19pm
7
Did you check the library.properties for the library?
PaulRB
September 9, 2025, 1:20pm
8
That does not sound correct. Perhaps you misinterpreted what you read. Please post a link to that page.
gfvalvo
September 9, 2025, 1:24pm
9
There are many flavors and ports of the "ESP Async" family. Recommend you make sure to use the one that's actively supported:
https://github.com/ESP32Async/ESPAsyncWebServer/wiki
How do you know this? If the Serial monitor doesn't work goto Tools | USB CDC On Boot | Enabled.
Then recompile and reload the code.
The built-in led is a separate issue.
system
Closed
March 8, 2026, 2:45pm
11
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.