
latest 1.1.831 | nixie project | matrix
A PID service allows the tracking and transformation of output in relation to iinput. This is currently used as one of the tracking strategies in the Tracking service. Input is sent to PID, a "compute" method is sent and appropriate output is sent to a servo.
References
######################################### # Pid.py # categories: pid # more info @: http://myrobotlab.org/service/Pid ######################################### import time import random pid = runtime.start("test", "Pid") pid.setPid("pan", 1.0, 0.1, 0.0) pid.setSetpoint("pan", 320) pid.setPid("tilt", 1.0, 0.1, 0.0) pid.setSetpoint("tilt", 240) for i in range(0,200): i = random.randint(200,440) pid.compute("pan", i) i = random.randint(200,440) pid.compute("tilt", i) time.sleep(0.1)
test [[service/PID.py]]
test