I have a SPST switch and I just want to sense whether it's on or not. I will then turn on/off a relay depending on the state of this switch.
The two options I'm considering are: create a digital out on a pin going to one side of the switch, and read the digital in on another pin off the other side of the switch. Or put 5v from my voltage regulator to the switch, and read a digital in off the other side of the switch.
Would a resistor be necessary for the digital in pin with either of these options?