News for hackers. Stuff that matters.
Re:Ultimate Guide to Switch Debounce by alpaca128 on Saturday April 18, 2020 @05:55PM (#22911436)
> For most devices it is enough to just probe the switch periodically.

No, no, no, please don't. Almost all appliances I use ignore an estimated 60% of my usual button presses because they're polling in intervals just long enough to not recognise anything, and I absolutely hate it.

I always have to hold it down for a bit to make sure my input isn't just ignored. My laptop's power switch has this issue just like the washing machine, the dish washer and pretty much everything else that's not a PC keyboard, and it's one of the most infuriating UI issues I encounter every day, beside inactive text input fields with blinking cursors or selected text.

Re:Ultimate Guide to Switch Debounce by exmadscientist on Saturday April 18, 2020 @07:37PM (#22912066)
> No, no, no, please don't. Almost all appliances I use ignore an estimated 60% of my usual button presses because they're polling in intervals just long enough to not recognise anything, and I absolutely hate it.

That's just sloppy design. "Periodically" has meant "every 20 milliseconds" for projects I've shipped in the past. Anything shorter than 100 ms or so should be imperceptible.

Part of the problem you're likely seeing is due to the rise of capacitive touch "buttons", which are terrible in so many ways. But, alas, they are cheap and give a smooth front face, so designers and product managers love them....

(About the only time they're actually a good solution is when you need a completely sealed button.)

Re:Ultimate Guide to Switch Debounce by jimktrains2 on Saturday April 18, 2020 @06:29PM (#22911658)
Power buttons, like on a PC or washing machine, often require being held as a means of preventing accidental activation.
Re:Ultimate Guide to Switch Debounce by alpaca128 on Sunday April 19, 2020 @02:10AM (#22913923)
I don't mean just power buttons. When I said almost every button not on a PC keyboard I meant it. On the washing machine every single button has to be held almost half a second or it won't do anything. It's super frustrating. But of course it's possible to mess this up the other way too - one of my devices reacts quick to button presses, but you have to wait about half a second until it will react to the next press.
Re:Ultimate Guide to Switch Debounce by raverbashing on Sunday April 19, 2020 @06:10AM (#22914745)
I believe that in some applications this is by design

You don't want your washing machine to start just because you bumped into the button. Give it a good press and it's ok. (Same with the mechanical sensitivity of the buttons itself, they're not the same as your phone touchscreen let's put it this way)