Node MCU ESP32s sketch upload problem

Hi all,
I am trying to upload the below simple seketch to my ESP32s

ty#define ledpin 2
boolean ledstate=LOW;
void setup() {
  pinMode(ledpin, OUTPUT);
  // put your setup code here, to run once:
}

void loop() {
digitalWrite(ledpin, HIGH);
  delay(500);
digitalWrite(ledpin, LOW);
  delay(500);
digitalWrite(ledpin, HIGH);
  delay(500);
digitalWrite(ledpin, LOW);
  delay(500);
  // put your main code here, to run repeatedly:
}

But I got the below error

I have tried, ESP32 Dev Module, ESP32 WROOM DA Module, Node32s, Node MCU 32s boards, but all of them gives the same error

Try holding down the "boot" button until it starts uploading the code.

Regards

I did it, but same error

Not sure if this could help.
I was trying today to press the boot loader and some small electricity hit me from the board.
After that the blue led started blinking, and kept blinking for some time until I pressed enable bottom, when it is stopped. I pressed enable again but did not blink. I tired to connect it after that but still have the same error.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.