So I've recently started Arduino and I just had a question about the digitalRead() function.
Does the IO Pins read Voltage or Current?
The reason I'm asking is because of the attached circuit.
So IO pin 7 is HIGH when the button is not pressed because the resistor is connected to 5V through the resistor. When the button is pressed the button is shorted to ground and is LOW. Why does it read LOW? Surely it would still read 5v because it is still connected to 5V through the resistor?