Pages: [1]   Go Down
Author Topic: Arduino Always flashes three times when I release the button.  (Read 896 times)
0 Members and 1 Guest are viewing this topic.
Vancouver BC, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34129
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Vancouver BC, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Offline Offline
Edison Member
*
Karma: 29
Posts: 2449
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34129
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: