Hola, Agradecería la ayuda de alguien con los conocimientos para ayudarme a resolver este problema, tengo 2 esp32 pero solo una de ellas me genera este problema, Gracias de antemano.
Hello, I would appreciate the help of someone with the knowledge to help me solve this problem, I have 2 esp32 but only one of them generates this problem, Thanks in advance.`
Estas son las imágenes que corresponden a la esp32, es la que menos brilla, y la no funcional brilla como espejo:
Sketch uses 937877 bytes (71%) of program storage space. Maximum is 1310720 bytes.
Global variables use 45360 bytes (13%) of dynamic memory, leaving 282320 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port COM5
Connecting......................................
A fatal error occurred: Failed to connect to ESP32: Download mode successfully detected, but getting no sync reply: The serial TX path seems to be down.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
Failed uploading: uploading error: exit status 2`
#include <WiFi.h>
#include <WebServer.h>
const char* ssid = "esp32-dan";
const char* password = "12345";
WebServer server_esp(80);
void setup() {
Serial.begin(115200);
Serial.println("ESP32 server");
WiFi.softAP(ssid, password);
IPAddress ip = WiFi.softAPIP();
Serial.print("Nombre del servidor de la esp32 es:");
Serial.println(ssid);
Serial.print("La ip asignada es:");
Serial.println(ip);
server_esp.on("/", handleConnectionRoot);
server_esp.on("/device1", handleDevice1);
server_esp.on("/device2", handleDevice2);
server_esp.on("/device3", handleDevice3);
server_esp.onNotFound(handleNotFound);
}
void loop() {
server_esp.handleClient();
}
String device = "" ;
String answer = "";
void setAnswer(){
answer = "<!DOCTYPE html>\
<html>\
<body>\
<h1> HOLA \"" + device + "\"| </h1>\
</body>\
</html>";
}
void handleConnectionRoot(){
server_esp.send(200, "text/html", "Cliente desconocido");
}
void handleDevice1 (){
device = "ESP32-01";
Serial.println("el dispositivo que realice una peticion"); //
Serial.println(device);
setAnswer();
server_esp.send(200, "text/html", answer); //respuesta al cliente
}
void handleDevice2 (){
device = "ESP32-02";
Serial.println("el dispositivo que realice una peticion"); //
Serial.println(device);
setAnswer();
server_esp.send(200, "text/html", answer); //respuesta al cliente
}
void handleDevice3 (){
device = "ESP32-03";
Serial.println("el dispositivo que realice una peticion"); //
Serial.println(device);
setAnswer();
server_esp.send(200, "text/html", answer); //respuesta al cliente
}
void handleNotFound(){
server_esp.send(404, "text/html", "Error not found - 404");
}
`