Do the I/O pins on Arduino read current or voltage? 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?
They read voltage.  When you close the pushbutton switch the input should have a 0V or digital &quot;0&quot; on it.  When you open the pushbutton the resistor should pull the input to 5V or digital &quot;1&quot;.
Yes, it is still connected to +5V via the resistor but the nearly 0 Ohm switch pulls the line all the way (or very close) to 0V.