Question about Switches

Hi, beginner Arduino and electronics hobbyist here --- just getting started.

I have purchased these switches with the red buttons, and I'm trying to replicate this circuit from the Button tutorial.

However, the switches in this tutorial have 4 prongs. I know they are technically the same, but how would I wire up the circuit from the tutorial with the new buttons that have 2 prongs.

Thanks for your help,

Charlie

The push button switches generally have pins 1/2 and 3/4 wired together (or 1/3 and 2/4, depending on how numbered). If you only have 2 prongs, that makes it easy - one side will go to the arduino pin, and the other side will go to +5 of Gnd, whatever the schematic calls for.

Thanks CrossRoads

How do I incorporate the resistor and the connections to both the GND and 5V sockets on one-side of the switch without a breadboard? Just solder connections?

Charlie

Sure. I prefer this tho: Connect one side of switch to arduino pin, the other to ground. Enable the internal pullup resistor. Then watch for a low on the pin to show the button is pressed.

Thanks again, I will give this a go!

Pull-up resistors - cool stuff, new to me.

Charlie

Dear Charlie...

We were all there once! It is so hard, once you've "got going" to recall the things that "didn't make sense"....

Anyway... I hope you will find...

http://sheepdogguides.com/arduino/aht0button.htm

... useful. Talks about the basic issues of connecting switches.

By the way... get a breadboard and a (cheap-ish, for now) multimeter!

Breadboard: Lots of sources, e.g....

http://shop.moderndevice.com/products/mini-breadboard

(Get at least two... more if you can. They're small. But 2 small is more flexible than 1 large.)

If your partner doesn't hear that I sent you there, and you are ready for WAY too much temptation, go to Sparkfun.com They have breadboards, too... and a WHOLE lot more!

(I've gone with the odds, and guessed you are in the US. Add at least a country to your profile, if, say, you live in the UK and would rather hear of UK suppliers.)