Control humidity using PID by driving two solenoid valves. Adjust the public setpoint variable and call update().
More...
#include <SingleHumidistat.h>
|
| SingleHumidistat (HumiditySensor *hs, const ConfigStore *cs, etl::array< uint8_t, 2 > pins_solenoid, uint8_t pwmRes) |
| Constructor.
|
|
void | update () |
|
void | updatePIDParameters () |
|
| Humidistat (const ConfigStore *cs, HumiditySensor *hs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax) |
| Constructor.
|
|
double | getHumidity () const |
| Read the humidity.
|
|
double | getTemperature () const |
| Read the temperature.
|
|
double | getCvMin () const |
|
double | getCvMax () const |
|
| Controller (const ConfigStore *cs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double defaultSP, double defaultCV) |
| Constructor.
|
|
void | getTerms (double &pTerm, double &iTerm, double &dTerm) const |
| Get the three PID terms by reference.
|
|
void | update () |
| Run the controller: Typically reads a sensor, runs a cycle of the PID loop and drives some actuator.
|
|
void | updatePIDParameters () |
| Update the PID parameters from the configStore.
|
|
const ConfigStore * | getConfigStore () |
| Get a pointer to the ConfigStore instance.
|
|
Control humidity using PID by driving two solenoid valves. Adjust the public setpoint variable and call update().
Definition at line 13 of file SingleHumidistat.h.
◆ SingleHumidistat()
SingleHumidistat::SingleHumidistat |
( |
HumiditySensor * | hs, |
|
|
const ConfigStore * | cs, |
|
|
etl::array< uint8_t, 2 > | pins_solenoid, |
|
|
uint8_t | pwmRes ) |
Constructor.
- Parameters
-
hs | Pointer to a HumiditySensor instance |
cs | Pointer to a ConfigStore instance |
pins_solenoid | Array of 2 integers corresponding to the solenoid pins |
pwmRes | PWM resolution (bits) |
Definition at line 6 of file SingleHumidistat.cpp.
◆ update()
void SingleHumidistat::update |
( |
| ) |
|
◆ updatePIDParameters()
void SingleHumidistat::updatePIDParameters |
( |
| ) |
|
◆ pins_solenoid
const uint8_t SingleHumidistat::pins_solenoid[2] |
|
private |
◆ pwmRes
const uint8_t SingleHumidistat::pwmRes |
|
private |
The documentation for this class was generated from the following files: