how to debounce a button
Hello,
I'm using RTOS and never had such problems. The task that scans the keyboard, wakes up every 10-20ms and read the key status. If there is toggle 1-0 I report key pressed. Using RTOS is very easy to build "long press" buttons, where you can change the functionality of the same key - fast press - INC/DEC, long press - ENTER.
Trust me, for keys and buttons scan RTOS is one excellent solution.
While the task is waiting (10-20ms) other tasks continue working. The whole project becomes very reliable, with smooth operation.
Best regards
Luben