pull up/down with rotary selector switch


i have rotary selector switch 6 positions, plus common 7 contacts. want keep things simple wiring each of 6 switch legs input on arduino. can i:


  • connect each leg ground via own pulldown

  • also connect each leg input pin

  • use single 100 ohm resistor common +5v



if works, there isn't way combine pulldowns, there?

you can use internal pull-up resistors:
code: [select]

pinmode(2, input);
digitalwrite(2, high); // enable internal pull-up

then ground common terminal.  pin low signal 1 selected.

you can use external pull-down resistors, 1 per pin, , connect common terminal +5.  pin high signal 1 selected.


Arduino Forum > Using Arduino > General Electronics > pull up/down with rotary selector switch


arduino

Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO