Go Down

Topic: Trying to solve debounce problem (Read 914 times) previous topic - next topic

JoshSG

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 8)

Thanks,

Josh

Jimmy60

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.

fire1

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 ,,,

Nick Gammon

Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up