Sketch uses 919461 bytes (70%) of program storage space. Maximum is 1310720 bytes.
Global variables use 42188 bytes (12%) of dynamic memory, leaving 285492 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\midst\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.6/esptool.exe" --chip esp32 --port "COM3" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x1000 "C:\Users\midst\AppData\Local\Temp\arduino\sketches\E50522744A362DA49051B61019F1E042/2sensorIsWet.ino.bootloader.bin" 0x8000 "C:\Users\midst\AppData\Local\Temp\arduino\sketches\E50522744A362DA49051B61019F1E042/2sensorIsWet.ino.partitions.bin" 0xe000 "C:\Users\midst\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\midst\AppData\Local\Temp\arduino\sketches\E50522744A362DA49051B61019F1E042/2sensorIsWet.ino.bin"
esptool.py v4.6
Serial port COM3
Connecting......................................
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2
#include <WiFi.h>
#include <WebServer.h>
IPAddress local_ip(192,168,1,1);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,0,0);
const char* ssid = "notmyssid";
const char* pass = "notmypass";
int lowSensor = A0;
int highSensor = A3;
int ROFlowMeter = A6;
int PartAFlow = A13;
int PartBFlow = A12;
int PartCFlow = A11;
int isWet = 2000;
WebServer server(80);
void setup() {
Serial.begin(115200);
// put your setup code here, to run once:
pinMode(lowSensor, INPUT);
pinMode(highSensor, INPUT);
pinMode(ROFlowMeter, INPUT);
pinMode(PartAFlow, INPUT);
pinMode(PartBFlow, INPUT);
pinMode(PartCFlow, INPUT);
WiFi.softAP(ssid, pass);
WiFi.softAPConfig(local_ip, gateway, subnet);
delay(100);
server.begin();
Serial.println("HTTP server started");
}
void loop() {
// put your main code here, to run repeatedly:
server.handleClient();
int lowSensorValue = analogRead(lowSensor);
int highSensorValue = analogRead(highSensor);
bool isLowWet = lowSensorValue < isWet;
bool isHighWet = highSensorValue < isWet;
if (!isLowWet && !isHighWet) {
String message = "Add water!";
server.send(200, "text/plain", message);
}
}
maybe this will also help; it does compile at least lol not sure it would be a functional page
This error might be caused by having the wrong port selected from the Tools > Port menu in Arduino IDE.
Please perform this experiment to verify that the port you have selected is your Arduino board:
- Disconnect the USB cable of the Arduino board from your computer.
- Select Tools > Port from the Arduino IDE menus.
- Take note of the ports, if any, listed in the menu.
- Close the Tools menu.
The ports list is only updated when the Tools menu is re-opened, so this step is essential. - Connect the Arduino board to your computer with a USB cable.
- Select Tools > Port from the Arduino IDE menus. - If a new port is listed in the menu, that is the port of your Arduino board.
Select that port from the menu and try uploading again.
If the upload still fails, or if no new port appeared after you plugged the Arduino board into your computer, add a reply here to let us know and we'll investigate the problem further.
i have changed the port as well as used a different board and I'm still getting the same error;
it gives the same error if I make it COM1 which has never worked or COM3 which has always worked. though if i plug the esp32 in to a different USB on a different part of my PC then it gives the fatal error
"could not open COM3, the port doesn't exist"
and I notice when I try and push to the other device I actually get a different error code which says;
"A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (0x00): Possible serial noise or corruption." but then when i go back to my esp32 with all my sensors it gives the No serial data received error
just trying to push this simple code
const int relay = A13;
void setup() {
// put your setup code here, to run once:
pinMode(relay, OUTPUT);
digitalWrite(relay, LOW);
delay(1000);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(relay, HIGH);
delay(1000);
digitalWrite(relay, LOW);
delay(2000);
}
Selecting ports at random is not an effective approach. If you follow the instructions I provided in my previous reply, there will be one of two outcomes:
- If you saw a port in the menu at step (6) that was not present at step (3), then you will know that is the port of your board.
- If you didn't see a new port at step (6), then your board is not producing a port.
Now please add a reply here to tell me which of the two outcomes you received after carefully following my instructions. If it was the first outcome, then tell me the name of the port.
5 posts were split to a new topic: Upload to ESP-WROOM-32 board fails: "No serial data received."
the board was burnt out i guess, i opened my last board that I have unopened and it worked, so I guess I'm doing something to burn the boards out? idk.
Thanks for the update @droopyboy. I'm glad you have a working board at least.
It is certainly possible. You should carefully review whatever you were doing with the board (especially any circuitry you had connected to it) the last time it was in a working state so that you might be able to identify what caused the damage and thus avoid doing that to the replacement boards.
If you can describe any circuitry you were using, the forum helpers might be able to explain why it was problematic.