3 import RPi.GPIO as GPIO
5 tuerSock = "/run/tuer.sock"
9 GPIO.setmode(GPIO.BOARD)
10 GPIO.setup(ringPin, GPIO.IN)
16 GPIO.wait_for_edge(ringPin, GPIO.BOTH)
17 # measure time since event
19 timePassed = now-lastEvent
20 print("Time between events %f" % timePassed)
24 if timePassed >= 1.5 and timePassed <= 3:
27 s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
34 print("Received unexpected answer %s" % str(data))