I made this basic #debouncing example with an SPDT switch which is a flip switch with 3 terminals: the common middle one is either connected to the left or right one. The left and right pin are pulled up with two resistors, and ground on the common pin pulls one of them down when the switch is engaged. The raw readout (blue) shows at least 10x 100 us = 1 ms of bounces which is not too bad actually. The edge of the debounced output (yellow) is vertical on this scale. More: https://www.eeweb.com/spdt-switch-debouncing-with-an-sr-latch/