2 Pin Button HELP

Hi,

I have a 2 pin momentary button that I want to connect to my Arduino UNO. I have tried all the tutorials online and on here that I can find but it wont work!!

I have tried connecting one side to the arduino pin 8 and one side to ground and enabling the internal resistor and also using my own 10K resistor but still no look!

Any ideas?

Thanks

Hi,

I have a 2 pin momentary button that I want to connect to my Arduino UNO. I have tried all the tutorials online and on here that I can find but it wont work!!

I have tried connecting one side to the arduino pin 8 and one side to ground and enabling the internal resistor and also using my own 10K resistor but still no look!

Any ideas?

Thanks

You must have done something wrong. All I can do is point you back to those same tutorials that show how to do it right and tell you to try again. Or I could rewrite them here but I'm not going to waste time doing that.

You should maybe show what you did to someone who knows what they're doing and see if they can spot what you did wrong. You could have done that here on this thread instead of just stating that you can't seem to do it. You could have given someone a chance to help you.

Insufficient information. Does the "button" show it works with an ohmmeter? A quick schematic showing how you have the "button" connected would be a big help, as well as posting one of the code examples that doesn't work.

Have you substituted other "buttons"? Result?

Paul

Cross posted here: [MERGED] 2 Pin Button HELP - General Electronics - Arduino Forum

Reported to mods.

We can't see what you might have done wrong unless you show us. How about some pictures?

sorry everyone for the lack of info, ill post some pics soon but for now I can tell you I have done EXACTLY what is done here:

both in code and the electronics side.

Wire diagonally across the button. The way the buttons are designed, two of the four legs are always connected and two of them are switched. When you connect diagonally across the switch you will always get a switched pair.

You should take your multimeter and investigate your button a little. See which legs are connected when pthe button is pressed and which are connected when it is not.

Don't follow instructables. Try to look for something a little better. Instructables are pretty much known for being crap. That's where you go to post your tutorial if you're some raw n00bie who barely gets it and the other sites keep taking your half assed wrong tutorials down.

Try something more like this: Gammon Forum : Electronics : Microprocessors : Switches tutorial

Delta_G:
You should take your multimeter and investigate your button a little. See which legs are connected when pthe button is pressed and which are connected when it is not.

Don't follow instructables. Try to look for something a little better. Instructables are pretty much known for being crap. That's where you go to post your tutorial if you're some raw n00bie who barely gets it and the other sites keep taking your half assed wrong tutorials down.

Try something more like this: Gammon Forum : Electronics : Microprocessors : Switches tutorial

Thank you sooooooo much for the link! I worked from the tutorials there and its now all working! :slight_smile: quick question.. if I have 4x buttons do I need a 10k resistor for each or can I use 1x for all 4 switches?

wreckitsteve:
Thank you sooooooo much for the link! I worked from the tutorials there and its now all working! :slight_smile: quick question.. if I have 4x buttons do I need a 10k resistor for each or can I use 1x for all 4 switches?

If you wire them the right way round and use the built-in pull-ups on the chip then you don't need any resistors.

If you insist on external components then yes, you need one for every button. Draw a picture only using one and think about it for a second. You link all your buttons together. Sit and look and think about that one for a minute and see if you can spot the problem. It will be a good lesson.

@wreckitsteve, do not cross-post. Threads merged.