← All exercises

Debounce

medium

Filters contact bounce by ignoring input transitions shorter than a preset time.

What it teaches

Ignore brief flickers in an input. The input has to stay in its new state for a set time before the output follows — the standard cure for button bounce or sensor noise.

Inputs and outputs

TagTypeDefaultDescription
In_SignalBOOLRaw input signal to be debounced
Cfg_DelayDINT500Debounce time in milliseconds
Out_SignalBOOLDebounced output signal

Required behavior