I understand that for digital inputs I should use a pull up resistor going from the pin to 5v, in order to drain any noise power that may find itself on it, that way if I don't apply voltage it's 0 and when I do apply some voltage it will be 1, otherwise noise voltage may cause it to go to 1 when I don't want to.
For a digital input, any voltage = 1, 0 voltage = 0, right?
I'm new to this, so that just confused me more. I thought the main reason for using one was to drain any "noise" power that may find itself on the line causing the digital state to switch to 1.
edit: After reading that link, can't I just use this and not worry about pullup/pulldown?Or is that just omitting it?
There are two major problems with a circuit of this type. ...
When the switch is on, it activates a 2 way relay, when the switch is off, that relay goes in it's closed position. So I would just connect the relay like shown in that circuit. 5v on the "on" side and ground on the "off" side and then input in the middle. The voltage would be supplied by an external source or perhaps the arduino itself and the switch just closes a circuit to activate the relay.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16