I am new to working with Arduino and I have a basic question.

I have an entire circuit set up and functioning, but I would like to add an arcade style button (Larger concave style) like this.

So my question is, how would I go about wiring this button to the Arduino? I don't need this button to control any lights or any other functions. The basic function of this button is for my code to register if the button is pressed or not. I also have the code done. I just want to know how to wire this.

Also I don't know if this helps, but I already have two normal tactile buttons (with 4 pins) in the circuit connected with a pull-up resistor and I know how to connect them. I just have no idea how to go about with only 2 pins.

Any help would be greatly appreciated. Thanks.

1 Answer 1


A simple switch, frequently called single pole single throw, will have only two pins. A switch works by breaking the circuit. This is shown in a wiring diagram in this manner:

spst switch

It matters not that the switch in this image is not the same switch as in the image you linked, the operation is identical. You may find momentary switches with similar appearance and identical diagrams. The difference is that one has to hold the button to make (or break) a circuit, which reverts once released.

You mention four pins. Those switches are electrically identical to the SPST switch, except that you may find you can control two independent circuits that both activate when the button is pressed. That would be a double pole single throw. There is also the possibility that the four-pin switch has common connections on each side. That is to say that if you connect your circuit to one pin, it is conductive to the other on on the same side, while the closure of the switch will also equally effect the two pins on the opposite side. I've found some tiny switches that have this arrangement, ostensibly to provide for four points to solder to the circuit board, making for a more sturdy attachment.

One can find some useful switch information on Electronics Hub, which is too exhaustive to cover here.

There are many other types of switches

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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