• warning: get_headers() [function.get-headers]: This function may only be used against URLs in /var/www/html/myrobotlab/themes/superclean/repoFile.php on line 35.
  • warning: file_get_contents(/service/PID.py) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/myrobotlab/themes/superclean/repoFile.php on line 38.

Pid

javadoc

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

Example for develop:

#file : Pid.py edit raw

#########################################
# 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)

GroG's picture

test [[service/PID.py]]

test