Go Down

Topic: 2 Pin Button HELP (Read 1 time) previous topic - next topic

wreckitsteve

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

wreckitsteve


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

Delta_G

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.
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

Paul_KD7HB

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

Delta_G

|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

adwsystems

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

wreckitsteve

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:

http://www.instructables.com/id/Arduino-Button-with-no-resistor/

both in code and the electronics side.

cattledog

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.

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:  http://www.gammon.com.au/switches
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

wreckitsteve

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:  http://www.gammon.com.au/switches
Thank you sooooooo much for the link! I worked from the tutorials there and its now all working! :) quick question.. if I have 4x buttons do I need a 10k resistor for each or can I use 1x for all 4 switches?

Delta_G

Thank you sooooooo much for the link! I worked from the tutorials there and its now all working! :) 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.
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

Coding Badly


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


Go Up