You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the RPi.GPIO library there is an interrupt method called 'wait_for_edge' that block until an event is detected. Is there a way of achieving the same beahavior with pifacecommon ? http://raspberrypi-aa.github.io/session2/input.html
The text was updated successfully, but these errors were encountered:
I've had an idea for this for a very long time - just not got around to implementing it. I'm not even sure if Raspbian is still organised like this but I imagine it would work something like this:
Bring up GPIO25 in userland with echo 25 > /sys/class/gpio/export.
In Python, use epoll to wait on changes:
with open('/sys/class/gpio/gpio25/value', 'r') as gpio25:
epoll = select.epoll()
epoll.register(gpio25, select.EPOLLIN | select.EPOLLET)
events = epoll.poll() # wait for interrupt
epoll.close()
In the RPi.GPIO library there is an interrupt method called 'wait_for_edge' that block until an event is detected. Is there a way of achieving the same beahavior with pifacecommon ?
http://raspberrypi-aa.github.io/session2/input.html
The text was updated successfully, but these errors were encountered: