This commit is contained in:
2019-03-20 13:52:00 +01:00
parent 3084fe0510
commit 5db0f78aee
910 changed files with 191152 additions and 322 deletions

18
script/test/TestPIDOld.py Normal file
View File

@@ -0,0 +1,18 @@
#Qhttps://github.com/tekdemo/MiniPID-Java
PID = get_context().getClassByName("MiniPID")
target = 41.0
pid=PID(0.2,0,0)
pid.setSetpoint(target)
pid.setOutputLimits(-100, 100)
while True:
sensor = out.read()
#set some sort of target value
output=pid.getOutput(sensor)
print output
#do something with the output
inp.write(output)
time.sleep(1.0)