how install toggle switch

8 años 4 meses antes - 8 años 4 meses antes #823 por Drwhite0910
don't understand about toggle pin connect

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

that right ?

Por favor, Identificarse para unirse a la conversación.

8 años 4 meses antes #829 por Ray
Respuesta de Ray sobre el tema 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.

Por favor, Identificarse para unirse a la conversación.

Tiempo de carga de la página: 0.086 segundos
Gracias a Foro Kunena
Joomla SEF URLs by Artio