Pages: 1 [2]   Go Down
Author Topic: Trying to solve debounce problem  (Read 827 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
If not today, maybe tomorrow
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Fire1,
            I totally agree with @Jimmy60, try not to use additional hardware as they add to your BOM, try to use the example from Button example that comes with Arduino, it has no extra hardware.  This is my almost a week of playing with Arduino, I bought UNO and Leonardo for a start together with a CHEAP LATCH, breadboard and telephone wires, so far I never use any additional debounce hardware and still happy with the result.

@HazardsMind, thanks for the tutorial but my UNO and Leonardo so far didn't report any debouncing issue with my Cheap Latch so I have no issue, and as long as I have no issue with the debounce, I will not use extra hardware, let us just help Fire1 smiley-cool

Thanks,

Josh
Logged

Saskatchewan
Offline Offline
Sr. Member
****
Karma: 19
Posts: 364
When the going gets weird, the weird turn pro. - Hunter S. Thompson
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I fail to see in this code where he is reading buttons. I see an incorrect attempt at a serial read. My gut is telling me that he is trying to fix the improper serial read with debouncing. The button_try = Serial.read() and the fact that he is looking at his buttons as characters is what brings me to this conclusion.

It would probably be a good idea for the OP to describe a little more precisely what he is expecting his Arduino sketch to actually do.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Jemmy60 ,

Yes , I'm trying to see what is the arduino doing when it's get any input by using serial monitor . then when it is working as I want , then I have to make some changes in the code for real life projects . My specific problem is in calling the variables , I think I had made some mistake some where in the definition of some variables .
Yesterday , I was searching for some software solution , and I have saw this page that agree with me . and he also doing the same as I'm doing . So please check this out :
http://www.labbookpages.co.uk/electronics/debounce.html

I want to use all the pins of arduino to do multiple work . So for that do I have to buy stuffs for each pin , I think maybe some software solution will be better .


Regards ,,,
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18810
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://gammon.com.au/switches
Logged


Pages: 1 [2]   Go Up
Jump to: