Quote:
Originally Posted by FRC4ME
I'm confused. It seems to me like you're saying:
When switch is off, signal should be connected to ground.
When switch is on, signal should be connected to 5V going through 10K resistor.
That's a little difficult to do with a SPST switch...
|
You're close, but backwards and incomplete.
When switch is off, signal should be connected to 5V going through 10K resistor (this will be read as
true).
When switch is on, signal should be connected to ground --
and still connected to 5V going through 10K resistor. The resistor will keep the 5V and ground on opposite sides of itself (this will be read as
false).
When done as Doug suggests, there is
always a 10K resistor from +5V to the signal line. The switch leaves the signal alone when open, and pulls it to ground when closed.