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

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

$
0
0
Or use the recommended gpiozero

Code:

from gpiozero import Buttonbutton = Button(23)print("waiting for button to be pressed...")button.wait_for_press()print("Button was pressed")

Statistics: Posted by neilgl — Tue Mar 19, 2024 9:06 pm



Viewing all articles
Browse latest Browse all 5247

Trending Articles