I am trying to set a GPIO port to LOW for n
seconds and set it to HIGH afterwards.
The problem is that it's not at all accurate. It varies between a small number of seconds to 2*n or even more.
GPIO.setup(7, GPIO.OUT)
GPIO.output(7, GPIO.LOW)
time.sleep(n)
GPIO.output(7, GPIO.HIGH)
I understand that I can't expect a highly accurate interval but a random number is still weird.