how install toggle switch

7 years 1 day ago - 7 years 1 day ago #823 by Drwhite0910
don't understand about toggle pin connect

(Left)connect to GND (center) Digital i/o 2 (Right) is +5V ?

that right ?

Please Log in to join the conversation.

6 years 11 months ago #829 by Ray
Replied by Ray on topic how install toggle switch
For pedalSHIELD and following the image you added it is like:

- Left : connected to ground.
- Center: connected to digital i/o.
- Right: not connected.

Arduino digital i/o has internal pull-up enabled by using "pinMode(TOGGLE, INPUT_PULLUP);
So the trick is that the input by default is in high state (because of the pull up):
- When the Center pin is connected to the Left, the input reads a low level.
- When the Center is connected to the Right, it is floating indeed and the internal pull up keeps it high.

So you have low to the left and high to the right.

Please Log in to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio