The code I'm trying to run looks something like this:
import RPi.GPIO as GPIO sensor=4 def cb(r):#r is just accept the argument passed by add_event_detect c=GPIO.wait_for_edge(sensor,GPIO.RISING,timeout=300) if c!=sensor: print "do something if timeout happens before next signal" GPIO.add_event_detect(sensor,GPIO.RISING,callback=cb)
When I run this I get RuntimeError: Conflicting edge detection events already. I've found this website https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=88951 which solves the case where two competing wait_for_edge cases are run simultaneously but:
I wasn't sure if this was would work for an event_detect and a wait_for_edge
I also wasn't sure if this would work with my specific hard/software specs. I'm running a Pi zero version 1.3 with what I assume is the latest version of Jesse that I downloaded last week from https://www.raspberrypi.org/downloads/raspbian/.
And furthermore I'm not the best at linux and don't want to damage my new PI.