Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1251

Python • GPIO.wait_for_edge >>> RuntimeError: Error waiting for edge

$
0
0
New to this forum. Please let know if my post is in the wrog place.

This code worked in an older RPi OS.
I looked on this forum and couldn't find any working solutions.

Here's the python as executed.

Any help greatly appreciated.

Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi.GPIO as GPIO
>>> GPIO.setmode(GPIO.BCM)
>>> GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)
>>> level = GPIO.input(23)
>>> print(f"Level on pin {23}: {level}")
Level on pin 23: 1
>>> GPIO.wait_for_edge(23, GPIO.FALLING)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Error waiting for edge
>>>

Statistics: Posted by Alan_Winslow — Thu Mar 14, 2024 8:02 pm



Viewing all articles
Browse latest Browse all 1251

Trending Articles