According to the RevPi documentation, the DIO module uses a watchdog which turns off the digital outputs after a short timeout after the last update from the CPU. To test this, I wrote this simple Python 3 program which toggles a digital output on and off, then leaves it on when the program exits. I expected the hardware to turn the digital output off after the watchdog timeout, but that did not happen. Any idea what is going on here?
Thanks,
Brendan
Code: Select all
import revpimodio2
from time import sleep
rpi = revpimodio2.RevPiModIO(autorefresh=False)
for i in range(1, 6):
x = i % 2
print("x = {}".format(x))
rpi.io.do1.value = x
rpi.writeprocimg()
sleep(1)
print("Exiting")