Skip to content

Commit 9e99a8d

Browse files
committed
Update OneButton.h
more aggressive timing for de-bounce (20 vs 50), click tick (200 vs 400) and press tick (400 vs 800)
1 parent a116ede commit 9e99a8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/OneButton.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ class OneButton {
211211
#endif
212212

213213
int16_t _pin; // hardware pin number.
214-
uint16_t _debounceTicks = 50; // number of ticks for debounce times.
215-
uint16_t _clickTicks = 400; // number of ticks that have to pass by before a click is detected.
216-
uint16_t _pressTicks = 800; // number of ticks that have to pass by before a long button press is detected
214+
uint16_t _debounceTicks = 20;//50; // number of ticks for debounce times.
215+
uint16_t _clickTicks = 200;//400; // number of ticks that have to pass by before a click is detected.
216+
uint16_t _pressTicks = 400;//800; // number of ticks that have to pass by before a long button press is detected
217217

218218
// These variables that hold information across the upcoming tick calls.
219219
// They are initialized once on program start and are updated every time the

0 commit comments

Comments
 (0)