Go Down

Topic: A strange problem with arduino LED  (Read 484 times) previous topic - next topic

wolf19091

hello genius
I hope you  have a good  day
yesterday I try  to program some push button but I see the LED is on when I make my hand close to the arduino but when I make my hand far from arduino the LED is off automatically and when I close slowly I see the LED is flashing
see the video I hope you found some things
https://www.youtube.com/watch?v=0G0CwqZOLMI

Paul__B

You omitted to set pinMode(yourbuttonpin, INPUT_PULLUP) and connect the button from yourbuttonpin to ground.

Grumpy_Mike

There seems to be a rule that when ever anyone says something is strange it is in fact perfectly normal. See this to see where you are misunderstanding things:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

Go Up