I watched part of a video last night explaining buttons using a pull up resistor. I sort of understand the theory, so I tried creating it in EasyEDA.
When I run their simulation tool, the multimeter doesn't show 5V as the video tutorial implies I should. The tutorial said there is no current flowing when the button isn't pressed, so there should be no voltage drop across the pull up resistor.
I may have misunderstood something fundamental or my circuit could be wrong. Any pointers would be appreciated.
I took out the LED and its resistor to simplify things, and I see the 5V in the multimeter as I expected.
I'm not sure why that makes a difference, to be honest.
The tutorial said there is no current flowing when the button isn't pressed, so there should be no voltage drop across the pull up resistor.
In the circuit you show there is a path via the 330 ohm resistor and the LED to earth so electrons are flowing through the 10K resistor causing a voltage drop.
Perhaps a link to the video in question?
Pulling out the LED and its resistor removed that path to the earth so no electron flow through the 10K unless the switch is pressed.
Sheesh, that was a silly question now I think about it. I was so focused on the pull up resistor that I wasn't thinking about the rest of the circuit.
The video shows the wire going to a GPIO, instead of an LED+resistor. I wasn't sure how to represent that in the EasyEDA editor, so I just used an LED, without thinking it through!
Thanks
I managed to get a button working the other night with a pull down resistor. I used an interrupt to respond to the button press. So progress! 😀
Baby steps.