Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interrupt reading multiple same level edges clarification #106

Open
sadilekivan opened this issue Jul 1, 2022 · 0 comments
Open

Interrupt reading multiple same level edges clarification #106

sadilekivan opened this issue Jul 1, 2022 · 0 comments

Comments

@sadilekivan
Copy link

For some time I'm trying to find the best way to capture edge level events on a logical signal pin. I have been trying multiple libraries in multiple languages and often there is this behavior. I run a thread to capture the events of me pressing a button and then print them. I get an output like this:

High
Low
High
Low
High
High
High
Low
High
Low
Low
High
Low

I thought it's some stuff wrong with the libraries, but now I'm wondering if this is correct. The button pressing can definitely make edges faster then the response time of the raspberry pi, but how does the interrupt figure there has been another High edge when there was no Low edge before that? My though is that the circuitry loses the information and I just happen to catch the next edge which was the same level. So can I just safely ignore the redundant edges? Or am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants