pyparts.systems.temperature_controller
index
/home/sean/src/python/pyparts/src/pyparts/systems/temperature_controller.py

 
Modules
       
pyparts.logic.pid_controller
time

 
Classes
       
__builtin__.object
TemperatureController

 
class TemperatureController(__builtin__.object)
    A PID based temperature controller.
 
TemperatureController uses a PID controller to regulate temperature.
A temperature sensor is used to read the current temperature and a PWM based
heater is used to increase the temperature when needed. Once the desired
temperature is reached the heater turns off until the temperature falls below
the desired temperature.
 
Attributes:
  _temp_sensor: TemperatureSensor. A temperature sensor to read temperature
    values from.
  _heater_pin: PwmOutput. A PWM output that controls a heating element.
  _pid_worker: PIDController.Worker. Worker thread for maintaining a
    temperature.
 
  Methods defined here:
__init__(self, temp_sensor, heater_pin, kp, ki, kd)
Creates a TemperatureController.
 
Args:
  temp_sensor: TemperatureSensor. A temperature sensor to read temperature.
  heater_pin: PwmOutput. A PWM output that controls a heating element.
  kp: Integer. PID controller constant term.
  ki: Integer. PID controller integrator term.
  kd: Integer. PID controller differentiator term.
disable(self)
Stops the temperature sensor and stops controlling the temperature.
enable(self)
Enable the temperature sensor and begin controlling the temperature.
set_temp_c(self, temp_c)
Set the desired temerature value.
 
Args:
  temp_c: Integer. The temperature to target with the controller.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
is_enabled
Checks whether the temperature controller has been enabled or not.
 
Returns:
  Boolean. True if the controller has been started.
temp_setting
Get the current temperature set point.

Data and other attributes defined here:
MAX_ERROR_DEGREES_C = 10.0