I have the following on-off-on-off button that I purchased from Adafruit for use with my Raspberry Pi 1 Model A.

I'm trying to "bypass" the "on-off-on-off" functionality, and just make it so that its an "on-off" switch/pushbutton. I believe the wiring setup that I'm looking for is:

enter image description here

Where I'm:

  • Connecting the RPi's 3.3V power supply to the middle pin of my pushbutton (with a 10kOhm resistor in between them); then
  • Wiring the two outer pins (left and right) together and attaching them to the GPIO input pin

Can anyone confirm I have the wiring correct? Or is it the opposite (where the outer two pins go to GPIO instead of GND, and the middle pin goes to GND)? Or is the solution something completely different?

Again, the ultimate goal here is to be able to push the button once, and send an input signal to the GPIO pin. Push the button a seconnd time, and the circuit disconnect (we stop sending input signals to the GPIO pin). Push it a 3rd time, and we're right back to the beginning (sending an input signal), etc.

closed as off-topic by Milliways, PNDA, Jacobm001 Sep 22 '17 at 22:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center." – Milliways, PNDA, Jacobm001
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Rule Number 0 : No Datasheet = NO SALE. Much of Adafruit catalog are Shenzhen specials with no datasheet. Buy another button, or take it apart to give us an internal schematics. Interpreting imprecise written descriptions is a waste of time for anyone trying to answer. – crasic Sep 16 '17 at 2:06
  • TRIGGERED!!!!!! – smeeb Sep 16 '17 at 11:37
  • With a datasheet, you would already be done :) – crasic Sep 16 '17 at 17:11

Connecting the left to the right will do the bypass that you want, in the sense that it will change this into a "simple" on-off switch. That's the first part of the answer.

Now as to which should be connected to GND and which to GPIO, that depends on whether your signal is high or low. You still seem confused about how inputs work at a very basic level. (I remember your earlier, related post.) You need to decide - and coordinate in both HW and SW - which type of signal you expect when the switch is "on". That means configuring either a pull up or a pull down resistor somewhere. (That somewhere could be the built-in pull-up/down on the Pi.) And then you need to wire accordingly. There are multiple questions here and many, many posts on this subject around.

  • Thanks @Brick (+1) - when the switch is ON, I want it to send a HI signal to the input pin -- is that possible to do? If so, then what rating resistor would I need to use, and where would I need to put it on the circuit (e.g. between the middle pin and GND? Or somewhere else maybe?)? Also, does that answer (ON == HI) answer your question about which end should be connected to GND vs GPIO? Thanks again! – smeeb Sep 15 '17 at 21:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.