Skip to content

Raspberry Pi GPIO interrupt debouncing not great #85

Open
@flyte

Description

@flyte

I've given the interrupts a test, and while they work, I get pretty bad bouncing on a simple switch (no hardware debouncing), which triggers the interrupt on almost every 'release' as well as each 'press'.

bounce

I've configured the software with interrupt: rising which should (and does) trigger when I press the button, however it also triggers quite often when I release the button. You can see why in the waveform above. The Pi's GPIO lib doesn't seem to be adequately protective of this, given that it should really discard the rising edge if it occurs within bouncetime of a falling edge.

I wonder if there's a neat way we can protect against this, which will work regardless of debounce implementations offered by the GPIO libs we use?

@BenjiU

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions