ESP32 - LED doesnt turns off

i have used the GPIO10 port to connect it with the red LED, but the LED doesnt turns off. it goes from 50% brightness to 100%. Even with no program the LED is still on.

int red= 10; 
void setup()
{ 
pinMode(red, OUTPUT); 
}
void loop()
{ 
digitalWrite(red, HIGH); 
delay(500);
digitalWrite(red, LOW); 
delay(500); 
} 

how bright is the led if you run this code

void loop()
{ 
//digitalWrite(red, HIGH); 
//delay(500);
//digitalWrite(red, LOW); 
//delay(500); 
} 

?

There are many different boards based on ESP32. What board are you using? Could it have a pull-up resistor on pin 10?

it glows like 50% without a program. with the programm it goes to 100% back 50%

Would it make sense that the LED is wired incorrectly if it glows 50% without the program?

its an esp32-c3-devkit and there are pull-up resistors on GND. pin 10 is between 2 GND pins

Please explain.

?? What is this?

Is there a current limiting resistor in series with the LED? What value did you choose? What kind of LED is it? Please post a wiring diagram.

1 Like

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