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

fix: add a custom function for polling the switch #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tonilekic
Copy link

The original script throws a RuntimeError on a RPi4: GPIO.wait_for_edge(3, GPIO.FALLING)
RuntimeError: Error waiting for edge.

This is due the wait_for_edge function that is not compatible with newer python versions.

This commit will add a function that polls the corresponding GPIO input.

The original script throws a RuntimeError on a RPi4:
GPIO.wait_for_edge(3, GPIO.FALLING)
RuntimeError: Error waiting for edge.

This is due the wait_for_edge function that is not compatible with newer python versions.

This commit will add a function that polls the corresponding GPIO input.
@tonilekic
Copy link
Author

This was tested on a Raspberry Pi 4 running:

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

and Python 3.11.2.

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

Successfully merging this pull request may close these issues.

1 participant