Files
dev/script/test/TestPID.py
2018-11-23 08:42:01 +01:00

18 lines
271 B
Python

PID = get_context().getClassByName("PID")
pid=PID(1,1,1);
while True:
sensor = sin.read()
target = 30.0
#set some sort of target value
output=pid.getOutput(sensor,target);
print output
#do something with the output
inp.write(output)
time.sleep(1.0)