Page 1 of 1

Tactile switches for L and R buttons

Posted: Mon May 08, 2017 4:32 pm
by TilenB
Hi,
so for my project i decided to use tactile switches for L and R buttons. My question here is, how do I wire them to the Pi ? I'm using the GPIO method and this board:
17028759_1967678170186104_625899657_n.jpg
17028759_1967678170186104_625899657_n.jpg (21.65 KiB) Viewed 10706 times
Switches:
Image

Re: Tactile switches for L and R buttons

Posted: Mon May 08, 2017 4:47 pm
by VeteranGamer
The ground you can wired to that pcb and the positive to the gpio

Re: Tactile switches for L and R buttons

Posted: Tue May 09, 2017 2:37 am
by TilenB
thank you, but how do I know which pins are ground and which are positive?

Re: Tactile switches for L and R buttons

Posted: Tue May 09, 2017 3:20 am
by VeteranGamer
TilenB wrote:
Tue May 09, 2017 2:37 am
thank you, but how do I know which pins are ground and which are positive?


it doesnt make a difference, just pick a side


if you watch wermy guide it in there





you can fast forward to around 11:35 of the video

Re: Tactile switches for L and R buttons

Posted: Tue May 09, 2017 4:26 am
by abrugsch
switches are not directional. however, with tact switches, of the 4 pins, 2 are connected to each other. (and the other 2 are also connected to each other...) like so: pins 1 and 2 are connected, pins 3 and 4 are connected.

Code: Select all

    pin1------------pin2
               \
             /
    pin3------------pin4
when you click the switch, the 2 sides become connected to each other.

Code: Select all

    pin1------------pin2
              /
             /
    pin3------------pin4
as long as you make sure you connect one 'side' to gnd and the other to your GPIO pin, then it doesn't matter which way round it goes. I can't off the top of my head remember if it's the long side or the short side that's connected but with a meter or a light and battery circuit it should be easy to determine. (or just google it ;) https://electronics.stackexchange.com/q ... breadboard )
if in doubt just use opposite corners

Re: Tactile switches for L and R buttons

Posted: Tue May 09, 2017 5:48 am
by fernandinho1337
look at the picture you posted.
the two pins that are "on top" are connected as well as the two bottoms ones.

best regards

Re: Tactile switches for L and R buttons

Posted: Thu May 11, 2017 11:26 am
by TilenB
so one of two goes to gpio and one of two to ground?

Re: Tactile switches for L and R buttons

Posted: Thu May 11, 2017 11:28 am
by TilenB
I mean like
x----x->one to gpio
/
x----x->one to ground

Re: Tactile switches for L and R buttons

Posted: Thu May 11, 2017 11:52 am
by abrugsch
Yes exactly