Closed fleetingbytes closed 6 years ago
The switch you show is called a 'tact' switch and is a momentary-on keyswitch.
Explain what you mean by a 'false positive KEY_SINGLE' as there is no explanation of what you expect to see, what you are seeing and why that should be considered a problem?
Well, most of the time, when I press the button once, the serial console writes a singe event KEY_SINGLE. But sometimes, about 1 in 20 times or more often I get two such events after just one press.
OK. It does not happen for me so if you find specific reasons for it let me know.
Hello Marco,
I have tried your UI_Switch library with the test code below and I'm getting a false positive KEY_SINGLE detect about 1 in 20 times or even more often when I press the standard Arduino push button (attached image borrowed from ladyada.net)
I used the following code (also attached):
Debounce_test.zip