Python:
Code: Select all
for i in range(count):
ch = DigitalOutput()
ch.setDeviceSerialNumber(576878)
ch.setChannel(i)
ch.openWaitForAttachment(1000)
state = ch.getState()
dutyCycle = ch.getDutyCycle()
ch.close()
print("port ", i, " State: " + str(state), " Duty cycle ", str(dutyCycle))
Code: Select all
/usr/local/bin/phidutil2 -p 1 1
Code: Select all
port 0 State: False Duty cycle 0.0
port 1 State: False Duty cycle 0.0
port 2 State: False Duty cycle 0.0
port 3 State: False Duty cycle 0.0