Skip to main content

Timeline for Simple debounce coding

Current License: CC BY-SA 4.0

6 events
when toggle format what by license comment
Oct 4, 2024 at 18:11 comment added Solmod The "switch" is actually the bare end of two wires at the moment until I could get everything working. Now that it works, I will be building up the physical circuit in a control box with a good quality press button switch - I may be able to reduce the period after that ;-). Anyway, thank you for you assistance - it has helped me a lot.
Oct 4, 2024 at 17:43 comment added 6v6gt @Solmod 400ms ? That must be some rough old switch but, anyway, I am happy that you have something which you can use. The code I supplied is a special case because it is not so usual to use an interrupt service routine to read a switch/button (overkill or sledgehammer to crack a nut) but there are cases where it is valid for example when the loop contains some blocking code.
Oct 4, 2024 at 13:21 comment added Solmod This has worked perfectly. Thank you. I have tweaked the debounce delay up to 400 millis which works best with the switch that I am using. Thanks again.
Oct 4, 2024 at 13:19 vote accept Solmod
Oct 3, 2024 at 22:51 history edited 6v6gt CC BY-SA 4.0
added 168 characters in body
Oct 3, 2024 at 21:15 history answered 6v6gt CC BY-SA 4.0