yeah but noise on switches/push-buttons appear on both rising and falling edges???
But yeah, here it could be safer to debounce before, as the TOGGLE will execute pretty fast, and the code next to the IF might be long enough to act as Rising edge debouncing.. who know
I'm not a fan of reading push button directly in many cases... Timer interrupt do the whole thing in background and also do the debouncing... why doing simple when you can do it 'complicated'![]()
Bookmarks