Skip to content

Enhancement: Debounce input pins #20

@zpfvo

Description

@zpfvo

Hi,
i'm using this library in one of our products. I just came back from an EMC test and we sometimes had a problem with a toggling pin when our board was exposed to electromagnetic radiation.

We could solve the problem easily by checking if the state of the pin stayed the same for a short period of time.
I implemented this debounce logic in the callback function but i thought if this was a nice feature to be embedded in the library itself.

If you think this might be a nice idea, i will prepare a pull request to add this functionality as soon as i have some time (sry very busy atm). I think it would be nice if one activate debounce separately for the pins and also set different deboucne times.

Greetings!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions