In course learn esp32 with arduio ide and module 2 unit 1 i set up my hardware as given in that unit. but even if the button is turned off the led is still in dim and turned on. when i switched on the button its get bright. but when button is switched off then led needs to be turned off completely. why is this happening.
- Which resistor are you using connected to your LED?
- Can you try to use a different LED (different color for example)?
I am using 3mm led and tested both with 100ohm resistor and 1500 ohm resistor. its giving the same results.
But i observed one thing whenever i touch one leg of led with my hand and perform switch on and off all things work perfectly.
Is this issue of led and its matching resistor only. Can you tell me how to decide how to choose combination of led and resistor.
In the course, I’m using a 330 Ohm resistor with a 5mm LED, but a 3mm LED with like a 220 Ohm resistor should also work just fine.
Yes, I think that’s the problem. It looks like there’s a ground or some wire not properly connected that causes the LED to light up. Because that’s not a normal behavior.
Can you ensure that you have my exact circuit (with 330 Ohm resistor connected to a 5mm LED)?
Then, a 10K Ohm resistor connected like that to the pushnbutton?