Hi there, I have a simple on/off switch I harvested from an old lamp, However it only has 2 pins on it, the instructions on here say about 3 pins with pulldown resistor.
How would I go about connecting this kind of switch to the arduino?
Hi there, I have a simple on/off switch I harvested from an old lamp, However it only has 2 pins on it, the instructions on here say about 3 pins with pulldown resistor.
How would I go about connecting this kind of switch to the arduino?
Connect one end of the switch to ground, the other end to the pull-up and the input pin.
The other end of the pull-up goes to 5V
Never saw a simple on/off switch that needed three terminals.
I apologise I think I may not have explained this correctly.
The switch itself only has 2 pins i.e:
=
|___|
| |
I know the basic pushbutton, ( 1 5v 1 Gnd via pulldown res 1 Input) but was wondering how to wire it in this case?
What's with the pull-down?
The AVR has built-in pull-ups.
I've just been following the tutorial here for button wiring:
How would I connect a switch that only has 2 pins on it, would I connect one end to the input pin and one to ground? or one to 5v and one to the input pin? or some other wier thing I haven't thought of yet.
Although that switch in the tutorial has 4 mechanical legs, electrically it only has 2 contacts. Wire yours up like Awol said.
Ah I get it now
derp