(simple) Debouncing 2 button state machine

No, my code has nothing to do with a library. I like people to understand how code works, which means NOT hiding it in a library. I understand that does not suit everyone though, for some people a library is just what they need.

I'm not clear from reading all your replies to me and others that you have understood the importance of detecting when a button becomes pressed as opposed to detecting when it is pressed.

2 Likes