While working on ["piggui"](https://github.com/andrewdavidmackenzie/pigg) I came across an issue that I raised with the authoer of the [rppal](https://github.com/golemparts/rppal) library I use for reading the GPIO hardware on the Pi ,
See the discussion in this [GH Issue](https://github.com/golemparts/rppal/issues/149).
The issue is that we receive many "interrupts" due to detected changes in the level of a GPIO input pin, but the level read is in fact the same (i.e. there is no transition, so there should be no interrupt.
We expect bounce, especially on cheap switches and buttons, but the fact we get many (say) LOW readings in succession, instead of LOW-HIGH-LOW-HIGH transition makes us wonder if there is an issue related to the speed of the interrupts.
We wonder is other GPIO libraries in other languages (e.g. Python) have come across this issue, and if so, how have they handled it.
The code that loops, polling for these events is [here](https://github.com/golemparts/rppal/blo ... pt.rs#L257)
Thanks for any pointers.
See the discussion in this [GH Issue](https://github.com/golemparts/rppal/issues/149).
The issue is that we receive many "interrupts" due to detected changes in the level of a GPIO input pin, but the level read is in fact the same (i.e. there is no transition, so there should be no interrupt.
We expect bounce, especially on cheap switches and buttons, but the fact we get many (say) LOW readings in succession, instead of LOW-HIGH-LOW-HIGH transition makes us wonder if there is an issue related to the speed of the interrupts.
We wonder is other GPIO libraries in other languages (e.g. Python) have come across this issue, and if so, how have they handled it.
The code that loops, polling for these events is [here](https://github.com/golemparts/rppal/blo ... pt.rs#L257)
Thanks for any pointers.
Statistics: Posted by amackenz — Thu Jun 20, 2024 9:18 pm — Replies 0 — Views 42