Go Down

Topic: Arduino Always flashes three times when I release the button. (Read 949 times) previous topic - next topic

Chris7777

Hello

I am very new to the Arduino, but not new to programming. My question is I am sure very simple and stupid, but when I load up the Digital>Button Example code and press the button it turns on while I am holding the button but when I release the button it flashes 3 times very quickly. I have tried Googling this problem and searching this forum with out finding an answer. Is it possible to stop the 3 flashes when I release the button?

Thanks
Chris

dxw00d

There is no debouncing in that sketch, so I imagine the button is bouncing. Try the Debounce sketch.

Grumpy_Mike

What button is this? Not the one on the board, that is a reset button and when released will flash.

Chris7777

Yes it is the onboard one, it is the only button I have right now. That would explain why some the examples always seem to run the setup method over and over each time I press the button.
Is there I way to disable the reset function of the button and just have it act like normal button? If not I will have to go buy some more parts tomorrow.

Thanks
Chris

dxw00d

Good spot Mike. I really hadn't considered that.

You can't re-purpose the reset button. It's hard-wired to the processor.

cjdelphi

Place a small capacitor (6v+)  if all you have is a bigger cap, try lowering the resistor.. or in place a delay after the first read of the button press, then delay(250); or so, but i'd throw on a capacitor for ease.

Grumpy_Mike

Yes you can disable it but then you can't use it for anything else.

Go Up