diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/ButtonReader_8cpp.html b/ButtonReader_8cpp.html new file mode 100644 index 0000000..b81b58d --- /dev/null +++ b/ButtonReader_8cpp.html @@ -0,0 +1,124 @@ + + +
+ + + + +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Classes | |
class | ButtonReader |
Read button state from a voltage ladder-style keypad. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Enumerations | |
enum class | Buttons { + NONE +, RIGHT +, UP +, DOWN +, + LEFT +, SELECT + + } |
Possible button values. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "CascadeHumidistat.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <etl/span.h>
#include <etl/array.h>
#include "aliases.h"
#include "Humidistat.h"
#include "../sensor/FlowSensor.h"
#include "FlowController.h"
Go to the source code of this file.
++Classes | |
class | CascadeHumidistat |
Control humidity using cascade PID: outer PID loop sets setpoints of two inner flow controllers, which drive a solenoid valve each. Adjust the public setpoint variable and call update(). More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "CharDisplayUI.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <LiquidCrystal.h>
#include <etl/span.h>
#include "ControllerUI.h"
#include "control/SingleHumidistat.h"
Go to the source code of this file.
++Classes | |
class | CharDisplayUI |
TUI for 16x2 character LCD. Holds a reference to a LiquidCrystal instance for writing to display. Displays current mode, PV, SP, and CV the first line of the display, and temperatures on the second line. Use keypad to adjust setpoint (UP/DOWN for fine, LEFT/RIGHT for coarse). More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <stdint.h>
#include <math.h>
#include "ConfigPar.h"
#include "asprintf.h"
#include "imath.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Classes | |
class | ConfigPar |
A class for storing references to variables of various types (uint8_t, uint16_t, or double). More... | |
struct | ConfigPar::Var |
+Macros | |
#define | XSTR(s) |
#define | STR(s) |
#define | WIDTH 7 |
#define | NUM_DIGITS WIDTH - 2 |
#define | NUM_DECIMALS 4 |
#define NUM_DECIMALS 4 | +
Definition at line 8 of file ConfigPar.h.
+ +#define NUM_DIGITS WIDTH - 2 | +
Definition at line 7 of file ConfigPar.h.
+ +#define STR | +( | +s | ) | ++ |
Definition at line 5 of file ConfigPar.h.
+ +#define WIDTH 7 | +
Definition at line 6 of file ConfigPar.h.
+ +#define XSTR | +( | +s | ) | ++ |
Definition at line 4 of file ConfigPar.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "ControllerUI.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <stdint.h>
#include <etl/span.h>
#include <Print.h>
#include "input/ButtonReader.h"
#include "sensor/ThermistorReader.h"
#include "asprintf.h"
Go to the source code of this file.
++Classes | |
class | ControllerUI |
User interface (display and input) for humidistat. Hold references to ButtonReader for keypad input, and Humidistat for updating the humidity setpoint. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "Controller.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Classes | |
class | Controller |
Base class for a controller. Owns a PID instance, and holds a reference to a ConfigStore instance. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "DHTHumiditySensor.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "DHT.h"
Go to the source code of this file.
++Classes | |
class | DHTHumiditySensor |
Implementation of the HumiditySensor interface for the DHT22/AM2302 sensor. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Classes | |
struct | ConfigStore |
Config store containing variables, which can be stored in EEPROM. More... | |
class | EEPROMConfig |
Load/save an (internal) ConfigStore in EEPROM. More... | |
+Variables | |
struct ConfigStore | defaultConfigStore |
struct ConfigStore defaultConfigStore | +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "Controller.h"
#include "PID.h"
#include "../sensor/FlowSensor.h"
#include "../EEPROMConfig.h"
Go to the source code of this file.
++Classes | |
class | FlowController |
Controls flow. Holds a reference to a FlowSensor instance. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Classes | |
class | FlowSensor |
Read flow rate using a Omron D6F-P0010 MEMS flow sensor. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <U8g2lib.h>
#include <SPI.h>
#include <etl/span.h>
#include <cmath>
#include "ConfigPar.h"
#include "advanceEnum.h"
#include "ControllerUI.h"
#include "EEPROMConfig.h"
#include "../control/SingleHumidistat.h"
#include "../control/CascadeHumidistat.h"
#include "SetpointProfileRunner.h"
Go to the source code of this file.
++Classes | |
class | GraphicalDisplayUI< Humidistat_t > |
TUI for 128*64 px graphical display using U8g2. Holds references to a U8g2lib instance for writing to display, an EEPROMConfig instance to edit the config, and to a Humidistat instance to show/edit its state. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "Humidistat.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Classes | |
class | Humidistat |
Base class for a humidistat. Holds a reference to a HumiditySensor instance. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "Ks0256VoltLadder.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Classes | |
class | Ks0256VoltLadder |
Implementation of the VoltLadder interface for the Keyestudio Ks0256 keypad. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "Ks0466VoltLadder.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Classes | |
class | Ks0466VoltLadder |
Implementation of the VoltLadder interface for the Keyestudio Ks0466 keypad. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "PID.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <stdint.h>
Go to the source code of this file.
++Classes | |
class | PID |
PID controller in parallel form implemented in floating-point arithmetic. Features Derivative-on-Measurement, anti-windup through conditional integration, bumpless transfer, and feed-forward. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <stdint.h>
#include <etl/span.h>
Go to the source code of this file.
++Classes | |
struct | Point |
Point: a vector of a time and setpoint value. More... | |
struct | SPProfile |
Setpoint profile: a label and a span over Points. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "SHTHumiditySensor.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <math.h>
#include <Wire.h>
#include <SHTSensor.h>
Go to the source code of this file.
++Classes | |
class | SHTHumiditySensor |
Implementation of the HumiditySensor interface for the Sensirion SHT85 sensor. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <stdint.h>
#include <etl/span.h>
#include "asprintf.h"
#include "control/SingleHumidistat.h"
#include "control/CascadeHumidistat.h"
#include "sensor/ThermistorReader.h"
Go to the source code of this file.
++Classes | |
class | SerialLogger< Humidistat_t > |
Logs humidistat data over serial. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include "SetpointProfileRunner.h"
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Classes | |
class | SetpointProfileRunner |
'Runs' a setpoint profile. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <stdint.h>
#include <etl/array.h>
#include "aliases.h"
#include "Humidistat.h"
#include "EEPROMConfig.h"
Go to the source code of this file.
++Classes | |
class | SingleHumidistat |
Control humidity using PID by driving two solenoid valves. Adjust the public setpoint variable and call update(). More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <stdint.h>
Go to the source code of this file.
++Classes | |
class | ThermistorReader |
Driver for thermistor thermometers. More... | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <stdint.h>
Go to the source code of this file.
++Functions | |
template<typename T > | |
void | advanceEnum (T &e, int8_t n=1) |
Cycle through (advance) an enum. | |
void advanceEnum | +( | +T & | e, | +
+ | + | int8_t | n = 1 ) | +
Cycle through (advance) an enum.
+T | Enum type (should have _last as final element, equaling the last valid element) |
e | Enum instance |
n | Step (can be negative) |
Definition at line 11 of file advanceEnum.h.
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
CButtonReader | Read button state from a voltage ladder-style keypad |
CCascadeHumidistat | Control humidity using cascade PID: outer PID loop sets setpoints of two inner flow controllers, which drive a solenoid valve each. Adjust the public setpoint variable and call update() |
CCharDisplayUI | TUI for 16x2 character LCD. Holds a reference to a LiquidCrystal instance for writing to display. Displays current mode, PV, SP, and CV the first line of the display, and temperatures on the second line. Use keypad to adjust setpoint (UP/DOWN for fine, LEFT/RIGHT for coarse) |
▼CConfigPar | A class for storing references to variables of various types (uint8_t, uint16_t, or double) |
CVar | |
CConfigStore | Config store containing variables, which can be stored in EEPROM |
CController | Base class for a controller. Owns a PID instance, and holds a reference to a ConfigStore instance |
CControllerUI | User interface (display and input) for humidistat. Hold references to ButtonReader for keypad input, and Humidistat for updating the humidity setpoint |
CDHTHumiditySensor | Implementation of the HumiditySensor interface for the DHT22/AM2302 sensor |
CEEPROMConfig | Load/save an (internal) ConfigStore in EEPROM |
CFlowController | Controls flow. Holds a reference to a FlowSensor instance |
CFlowSensor | Read flow rate using a Omron D6F-P0010 MEMS flow sensor |
CGraphicalDisplayUI | TUI for 128*64 px graphical display using U8g2. Holds references to a U8g2lib instance for writing to display, an EEPROMConfig instance to edit the config, and to a Humidistat instance to show/edit its state |
CHumidistat | Base class for a humidistat. Holds a reference to a HumiditySensor instance |
CKs0256VoltLadder | Implementation of the VoltLadder interface for the Keyestudio Ks0256 keypad |
CKs0466VoltLadder | Implementation of the VoltLadder interface for the Keyestudio Ks0466 keypad |
CPID | PID controller in parallel form implemented in floating-point arithmetic. Features Derivative-on-Measurement, anti-windup through conditional integration, bumpless transfer, and feed-forward |
CPoint | Point: a vector of a time and setpoint value |
CSerialLogger | Logs humidistat data over serial |
CSetpointProfileRunner | 'Runs' a setpoint profile |
CSHTHumiditySensor | Implementation of the HumiditySensor interface for the Sensirion SHT85 sensor |
CSingleHumidistat | Control humidity using PID by driving two solenoid valves. Adjust the public setpoint variable and call update() |
CSPProfile | Setpoint profile: a label and a span over Points |
CThermistorReader | Driver for thermistor thermometers |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
++Functions | |
template<typename... T> | |
char * | asprintf (const char *fmt, T... args) |
Print formatted data to string. Automatically allocates string on the heap. Make sure to delete it immediately afterwards. | |
char * asprintf | +( | +const char * | fmt, | +
+ | + | T... | args ) | +
Print formatted data to string. Automatically allocates string on the heap. Make sure to delete it immediately afterwards.
+fmt | Format string |
args | Arguments specifying data to print |
Definition at line 13 of file asprintf.h.
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for ButtonReader, including all inherited members.
+ButtonReader(uint8_t pin_btn, const VoltLadder *voltLadder) | ButtonReader | explicit |
getPressedFor() const | ButtonReader | |
isPressed() const | ButtonReader | |
lastState | ButtonReader | private |
pin_btn | ButtonReader | private |
pressedSince | ButtonReader | private |
sample() | ButtonReader | |
voltLadder | ButtonReader | private |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Read button state from a voltage ladder-style keypad. + More...
+ +#include <ButtonReader.h>
+Public Member Functions | |
ButtonReader (uint8_t pin_btn, const VoltLadder *voltLadder) | |
Constructor. | |
void | sample () |
Sample the button signal. Call this in the main loop. | |
Buttons | isPressed () const |
Get the button state. | |
uint32_t | getPressedFor () const |
Get the duration the key has been pressed. This can be used for debouncing using a stable interval. | |
+Private Attributes | |
const VoltLadder & | voltLadder |
Reference to a voltLadder instance. | |
uint8_t | pin_btn |
Pin corresponding to the keypad. | |
Buttons | lastState = Buttons::NONE |
Last sampled state of the keypad. | |
unsigned long | pressedSince = 0 |
Time of the start of the keypress (in micros) | |
Read button state from a voltage ladder-style keypad.
+ +Definition at line 10 of file ButtonReader.h.
+
+
|
+ +explicit | +
Constructor.
+pin_btn | Pin corresponding to the keypad |
voltLadder | Pointer to VoltLadder instance |
Definition at line 4 of file ButtonReader.cpp.
+ +uint32_t ButtonReader::getPressedFor | +( | +) | +const | +
Get the duration the key has been pressed. This can be used for debouncing using a stable interval.
+Definition at line 18 of file ButtonReader.cpp.
+Buttons ButtonReader::isPressed | +( | +) | +const | +
Get the button state.
+Definition at line 14 of file ButtonReader.cpp.
+void ButtonReader::sample | +( | +) | ++ |
Sample the button signal. Call this in the main loop.
+ +Definition at line 6 of file ButtonReader.cpp.
+
+
|
+ +private | +
Last sampled state of the keypad.
+ +Definition at line 15 of file ButtonReader.h.
+ +
+
|
+ +private | +
Pin corresponding to the keypad.
+ +Definition at line 13 of file ButtonReader.h.
+ +
+
|
+ +private | +
Time of the start of the keypress (in micros)
+ +Definition at line 16 of file ButtonReader.h.
+ +
+
|
+ +private | +
Reference to a voltLadder instance.
+ +Definition at line 12 of file ButtonReader.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for CascadeHumidistat, including all inherited members.
+active | Controller | |
CascadeHumidistat(HumiditySensor *hs, const ConfigStore *cs, etl::span< const FlowSensor, 2 > flowSensors, etl::array< uint8_t, 2 > pins_solenoid, uint8_t pwmRes) | CascadeHumidistat | |
Controller(const ConfigStore *cs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double defaultSP, double defaultCV) | Controller | |
cs | Controller | protected |
cv | Controller | |
fcs | CascadeHumidistat | private |
getConfigStore() | Controller | |
getCvMax() const | Humidistat | |
getCvMin() const | Humidistat | |
getHumidity() const | Humidistat | |
getInner(uint8_t n) const | CascadeHumidistat | |
getTemperature() const | Humidistat | |
getTerms(double &pTerm, double &iTerm, double &dTerm) const | Controller | |
hs | Humidistat | protected |
Humidistat(const ConfigStore *cs, HumiditySensor *hs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax) | Humidistat | |
pid | Controller | protected |
pv | Controller | |
runCycle() | Humidistat | protected |
sensorLastRead | Controller | protected |
sp | Controller | |
update() | CascadeHumidistat | |
updatePIDParameters() | CascadeHumidistat |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Control humidity using cascade PID: outer PID loop sets setpoints of two inner flow controllers, which drive a solenoid valve each. Adjust the public setpoint variable and call update(). + More...
+ +#include <CascadeHumidistat.h>
+Public Member Functions | |
CascadeHumidistat (HumiditySensor *hs, const ConfigStore *cs, etl::span< const FlowSensor, 2 > flowSensors, etl::array< uint8_t, 2 > pins_solenoid, uint8_t pwmRes) | |
Constructor. | |
const FlowController * | getInner (uint8_t n) const |
Get a pointer to a inner FlowController instance. | |
void | update () |
void | updatePIDParameters () |
Public Member Functions inherited from Humidistat | |
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 |
Public Member Functions inherited from Controller | |
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. | |
+Private Attributes | |
FlowController | fcs [2] |
+Additional Inherited Members | |
Public Attributes inherited from Controller | |
bool | active = false |
double | pv = 0 |
Process variable. | |
double | sp |
Setpoint. | |
double | cv |
Control variable. | |
Protected Member Functions inherited from Humidistat | |
void | runCycle () |
Run a cycle of the controller. Reads a sample from the humidity controller and runs PID. | |
Protected Attributes inherited from Humidistat | |
HumiditySensor & | hs |
Protected Attributes inherited from Controller | |
PID | pid |
const ConfigStore & | cs |
unsigned long | sensorLastRead = 0 |
Control humidity using cascade PID: outer PID loop sets setpoints of two inner flow controllers, which drive a solenoid valve each. Adjust the public setpoint variable and call update().
+ +Definition at line 15 of file CascadeHumidistat.h.
+CascadeHumidistat::CascadeHumidistat | +( | +HumiditySensor * | hs, | +
+ | + | const ConfigStore * | cs, | +
+ | + | etl::span< const FlowSensor, 2 > | flowSensors, | +
+ | + | etl::array< uint8_t, 2 > | pins_solenoid, | +
+ | + | uint8_t | pwmRes ) | +
Constructor.
+hs | Pointer to a HumiditySensor instance |
cs | Pointer to a ConfigStore instance |
flowSensors | Span over 2 FlowSensor instances |
pins_solenoid | Array of 2 integers corresponding to the solenoid pins |
pwmRes | PWM resolution (bits) |
Definition at line 3 of file CascadeHumidistat.cpp.
+ +
+
|
+ +nodiscard | +
Get a pointer to a inner FlowController instance.
+n | the index of the FlowController (0 or 1) |
Definition at line 24 of file CascadeHumidistat.cpp.
+ +void CascadeHumidistat::update | +( | +) | ++ |
Definition at line 13 of file CascadeHumidistat.cpp.
+void CascadeHumidistat::updatePIDParameters | +( | +) | ++ |
Definition at line 28 of file CascadeHumidistat.cpp.
+
+
|
+ +private | +
Definition at line 17 of file CascadeHumidistat.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for CharDisplayUI, including all inherited members.
+adjustStep | ControllerUI | protected |
adjustValue(double delta, double &value, uint8_t min, uint8_t max) | ControllerUI | protectedstatic |
begin() override | CharDisplayUI | virtual |
blink(uint8_t col, uint8_t row, const char *buf) | ControllerUI | protected |
blinkInterval | ControllerUI | private |
buttonDebounceInterval | ControllerUI | private |
buttonReader | ControllerUI | private |
CharDisplayUI(LiquidCrystal *liquidCrystal, const ButtonReader *buttonReader, SingleHumidistat *humidistat, etl::span< const ThermistorReader, 4 > trs) | CharDisplayUI | explicit |
clear() override | CharDisplayUI | privatevirtual |
ControllerUI(Print *display, const ButtonReader *buttonReader, etl::span< const ThermistorReader, 4 > trs) | ControllerUI | explicitprotected |
display | ControllerUI | private |
draw() override | CharDisplayUI | privatevirtual |
drawInfo() override | CharDisplayUI | privatevirtual |
drawSplash() override | CharDisplayUI | privatevirtual |
handleInput(Buttons state, uint16_t pressedFor) override | CharDisplayUI | privatevirtual |
humidistat | CharDisplayUI | private |
infoDrawn | ControllerUI | private |
infoDuration | ControllerUI | private |
inputInterval | ControllerUI | private |
lastPressed | ControllerUI | private |
lastRefreshed | ControllerUI | protected |
liquidCrystal | CharDisplayUI | private |
printf(uint8_t col, uint8_t row, const char *fmt, T... args) | ControllerUI | inlineprotected |
printNTC(uint8_t col, uint8_t row, uint8_t i) | ControllerUI | protected |
refreshInterval | ControllerUI | protected |
screenCleared | ControllerUI | private |
setCursor(uint8_t col, uint8_t row) override | CharDisplayUI | privatevirtual |
splashDrawn | ControllerUI | private |
splashDuration | ControllerUI | private |
tolerance | ControllerUI | protected |
trs | ControllerUI | protected |
update() | ControllerUI |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
TUI for 16x2 character LCD. Holds a reference to a LiquidCrystal instance for writing to display. Displays current mode, PV, SP, and CV the first line of the display, and temperatures on the second line. Use keypad to adjust setpoint (UP/DOWN for fine, LEFT/RIGHT for coarse). + More...
+ +#include <CharDisplayUI.h>
+Public Member Functions | |
CharDisplayUI (LiquidCrystal *liquidCrystal, const ButtonReader *buttonReader, SingleHumidistat *humidistat, etl::span< const ThermistorReader, 4 > trs) | |
Constructor. | |
void | begin () override |
Initialize the display. | |
Public Member Functions inherited from ControllerUI | |
void | update () |
Update the display and handle input: set Humidistat's setpoint. | |
+Private Member Functions | |
void | draw () override |
Draw main interface (main loop). | |
void | drawSplash () override |
Draw splash screen. | |
void | drawInfo () override |
Draw info screen. | |
void | clear () override |
Clear screen. | |
void | setCursor (uint8_t col, uint8_t row) override |
Set cursor to coordinates. | |
bool | handleInput (Buttons state, uint16_t pressedFor) override |
Handle input. | |
+Private Attributes | |
LiquidCrystal & | liquidCrystal |
SingleHumidistat & | humidistat |
+Additional Inherited Members | |
Protected Member Functions inherited from ControllerUI | |
ControllerUI (Print *display, const ButtonReader *buttonReader, etl::span< const ThermistorReader, 4 > trs) | |
Constructor. | |
void | blink (uint8_t col, uint8_t row, const char *buf) |
Print blinking text. | |
void | printNTC (uint8_t col, uint8_t row, uint8_t i) |
Print temperature read from thermistors. Handles NaN values as 0. | |
template<typename... T> | |
void | printf (uint8_t col, uint8_t row, const char *fmt, T... args) |
Print formatted data to display, at (col, row). Calculates lengths and creates appropriate buffer internally. | |
Static Protected Member Functions inherited from ControllerUI | |
static void | adjustValue (double delta, double &value, uint8_t min, uint8_t max) |
In-/de-crement a variable, while clipping it to [min, max]. | |
Protected Attributes inherited from ControllerUI | |
etl::span< const ThermistorReader, 4 > | trs |
unsigned long | lastRefreshed = 0 |
Last time display was updated (in millis) | |
const uint16_t | refreshInterval = config::refreshInterval |
const uint8_t | adjustStep = config::adjustStep |
const double | tolerance = config::tolerance |
TUI for 16x2 character LCD. Holds a reference to a LiquidCrystal instance for writing to display. Displays current mode, PV, SP, and CV the first line of the display, and temperatures on the second line. Use keypad to adjust setpoint (UP/DOWN for fine, LEFT/RIGHT for coarse).
+ +Definition at line 14 of file CharDisplayUI.h.
+
+
|
+ +explicit | +
Constructor.
+liquidCrystal | Pointer to a LiquidCrystal instance |
buttonReader | Pointer to a ButtonReader instance |
humidistat | Pointer to a SingleHumidistat instance |
trs | Span over 4 ThermistorReader instances |
Definition at line 3 of file CharDisplayUI.cpp.
+ +
+
|
+ +overridevirtual | +
Initialize the display.
+ +Implements ControllerUI.
+ +Definition at line 67 of file CharDisplayUI.cpp.
+ +
+
|
+ +overrideprivatevirtual | +
Clear screen.
+ +Implements ControllerUI.
+ +Definition at line 38 of file CharDisplayUI.cpp.
+ +
+
|
+ +overrideprivatevirtual | +
Draw main interface (main loop).
+ +Implements ControllerUI.
+ +Definition at line 7 of file CharDisplayUI.cpp.
+
+
|
+ +overrideprivatevirtual | +
Draw info screen.
+ +Implements ControllerUI.
+ +Definition at line 54 of file CharDisplayUI.cpp.
+
+
|
+ +overrideprivatevirtual | +
Draw splash screen.
+ +Implements ControllerUI.
+ +Definition at line 46 of file CharDisplayUI.cpp.
+ +
+
|
+ +overrideprivatevirtual | +
Handle input.
+state | Keypad state |
pressedFor | Duration the key has been pressed (in millis) |
Implements ControllerUI.
+ +Definition at line 71 of file CharDisplayUI.cpp.
+
+
|
+ +overrideprivatevirtual | +
Set cursor to coordinates.
+col | LCD column |
row | LCD row |
Implements ControllerUI.
+ +Definition at line 42 of file CharDisplayUI.cpp.
+ +
+
|
+ +private | +
Definition at line 17 of file CharDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 16 of file CharDisplayUI.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
A class for storing references to variables of various types (uint8_t, uint16_t, or double). + More...
+ +#include <ConfigPar.h>
+Classes | |
struct | Var |
+Public Types | |
enum class | ConfigParType { ui8 +, ui16 +, d + } |
+Public Member Functions | |
void | adjust (int16_t delta) const |
Add delta to the variable. | |
char * | asprint () const |
Print "label: value" to string. Automatically allocates string on the heap. Make sure to delete it immediately afterwards. | |
uint8_t | magnitude () const |
Get magnitude (number of digits before the decimal separator) of variable. | |
+Public Attributes | |
struct ConfigPar::Var | var |
char | label [10] |
A class for storing references to variables of various types (uint8_t, uint16_t, or double).
+ +Definition at line 11 of file ConfigPar.h.
+
+
|
+ +strong | +
Enumerator | |
---|---|
ui8 | |
ui16 | |
d |
Definition at line 13 of file ConfigPar.h.
+ +void ConfigPar::adjust | +( | +int16_t | delta | ) | +const | +
Add delta to the variable.
+delta | Amount to add |
Definition at line 8 of file ConfigPar.cpp.
+char * ConfigPar::asprint | +( | +) | +const | +
Print "label: value" to string. Automatically allocates string on the heap. Make sure to delete it immediately afterwards.
+Definition at line 22 of file ConfigPar.cpp.
+uint8_t ConfigPar::magnitude | +( | +) | +const | +
Get magnitude (number of digits before the decimal separator) of variable.
+Definition at line 33 of file ConfigPar.cpp.
+char ConfigPar::label[10] | +
Definition at line 40 of file ConfigPar.h.
+ +struct ConfigPar::Var ConfigPar::var | +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for Controller, including all inherited members.
+active | Controller | |
Controller(const ConfigStore *cs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double defaultSP, double defaultCV) | Controller | |
cs | Controller | protected |
cv | Controller | |
getConfigStore() | Controller | |
getTerms(double &pTerm, double &iTerm, double &dTerm) const | Controller | |
pid | Controller | protected |
pv | Controller | |
sensorLastRead | Controller | protected |
sp | Controller | |
update() | Controller | |
updatePIDParameters() | Controller |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Base class for a controller. Owns a PID instance, and holds a reference to a ConfigStore instance. + More...
+ +#include <Controller.h>
+Public Member Functions | |
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. | |
+Public Attributes | |
bool | active = false |
double | pv = 0 |
Process variable. | |
double | sp |
Setpoint. | |
double | cv |
Control variable. | |
+Protected Attributes | |
PID | pid |
const ConfigStore & | cs |
unsigned long | sensorLastRead = 0 |
Base class for a controller. Owns a PID instance, and holds a reference to a ConfigStore instance.
+ +Definition at line 11 of file Controller.h.
+Controller::Controller | +( | +const ConfigStore * | cs, | +
+ | + | double | Kp, | +
+ | + | double | Ki, | +
+ | + | double | Kd, | +
+ | + | double | Kf, | +
+ | + | uint16_t | dt, | +
+ | + | double | cvMin, | +
+ | + | double | cvMax, | +
+ | + | double | defaultSP, | +
+ | + | double | defaultCV ) | +
Constructor.
+cs | Pointer to a ConfigStore instance |
Kp | Proportional gain |
Ki | Integral gain (in 1/s) |
Kd | Derivative gain (in s) |
Kf | Feed-forward gain |
dt | Timestep (in ms) |
cvMin | Lower limit for control value |
cvMax | Upper limit for control value |
defaultSP | Default value for the setpoint |
defaultCV | Default value for the control variable |
Definition at line 3 of file Controller.cpp.
+ +const ConfigStore * Controller::getConfigStore | +( | +) | ++ |
Get a pointer to the ConfigStore instance.
+Definition at line 13 of file Controller.cpp.
+void Controller::getTerms | +( | +double & | pTerm, | +
+ | + | double & | iTerm, | +
+ | + | double & | dTerm ) const | +
Get the three PID terms by reference.
+pTerm | |
iTerm | |
dTerm |
Definition at line 7 of file Controller.cpp.
+ +void Controller::update | +( | +) | ++ |
Run the controller: Typically reads a sensor, runs a cycle of the PID loop and drives some actuator.
+ +void Controller::updatePIDParameters | +( | +) | ++ |
Update the PID parameters from the configStore.
+ +bool Controller::active = false | +
Definition at line 19 of file Controller.h.
+ +
+
|
+ +protected | +
Definition at line 14 of file Controller.h.
+ +double Controller::cv | +
Control variable.
+ +Definition at line 23 of file Controller.h.
+ +
+
|
+ +protected | +
Definition at line 13 of file Controller.h.
+ +double Controller::pv = 0 | +
Process variable.
+ +Definition at line 21 of file Controller.h.
+ +
+
|
+ +protected | +
Definition at line 16 of file Controller.h.
+ +double Controller::sp | +
Setpoint.
+ +Definition at line 22 of file Controller.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for ControllerUI, including all inherited members.
+adjustStep | ControllerUI | protected |
adjustValue(double delta, double &value, uint8_t min, uint8_t max) | ControllerUI | protectedstatic |
begin()=0 | ControllerUI | pure virtual |
blink(uint8_t col, uint8_t row, const char *buf) | ControllerUI | protected |
blinkInterval | ControllerUI | private |
buttonDebounceInterval | ControllerUI | private |
buttonReader | ControllerUI | private |
clear()=0 | ControllerUI | privatepure virtual |
ControllerUI(Print *display, const ButtonReader *buttonReader, etl::span< const ThermistorReader, 4 > trs) | ControllerUI | explicitprotected |
display | ControllerUI | private |
draw()=0 | ControllerUI | privatepure virtual |
drawInfo()=0 | ControllerUI | privatepure virtual |
drawSplash()=0 | ControllerUI | privatepure virtual |
handleInput(Buttons state, uint16_t pressedFor)=0 | ControllerUI | privatepure virtual |
infoDrawn | ControllerUI | private |
infoDuration | ControllerUI | private |
inputInterval | ControllerUI | private |
lastPressed | ControllerUI | private |
lastRefreshed | ControllerUI | protected |
printf(uint8_t col, uint8_t row, const char *fmt, T... args) | ControllerUI | inlineprotected |
printNTC(uint8_t col, uint8_t row, uint8_t i) | ControllerUI | protected |
refreshInterval | ControllerUI | protected |
screenCleared | ControllerUI | private |
setCursor(uint8_t col, uint8_t row)=0 | ControllerUI | privatepure virtual |
splashDrawn | ControllerUI | private |
splashDuration | ControllerUI | private |
tolerance | ControllerUI | protected |
trs | ControllerUI | protected |
update() | ControllerUI |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
User interface (display and input) for humidistat. Hold references to ButtonReader for keypad input, and Humidistat for updating the humidity setpoint. + More...
+ +#include <ControllerUI.h>
+Public Member Functions | |
virtual void | begin ()=0 |
Initialize the display. | |
void | update () |
Update the display and handle input: set Humidistat's setpoint. | |
+Protected Member Functions | |
ControllerUI (Print *display, const ButtonReader *buttonReader, etl::span< const ThermistorReader, 4 > trs) | |
Constructor. | |
void | blink (uint8_t col, uint8_t row, const char *buf) |
Print blinking text. | |
void | printNTC (uint8_t col, uint8_t row, uint8_t i) |
Print temperature read from thermistors. Handles NaN values as 0. | |
template<typename... T> | |
void | printf (uint8_t col, uint8_t row, const char *fmt, T... args) |
Print formatted data to display, at (col, row). Calculates lengths and creates appropriate buffer internally. | |
+Static Protected Member Functions | |
static void | adjustValue (double delta, double &value, uint8_t min, uint8_t max) |
In-/de-crement a variable, while clipping it to [min, max]. | |
+Protected Attributes | |
etl::span< const ThermistorReader, 4 > | trs |
unsigned long | lastRefreshed = 0 |
Last time display was updated (in millis) | |
const uint16_t | refreshInterval = config::refreshInterval |
const uint8_t | adjustStep = config::adjustStep |
const double | tolerance = config::tolerance |
+Private Member Functions | |
virtual void | draw ()=0 |
Draw main interface (main loop). | |
virtual void | drawSplash ()=0 |
Draw splash screen. | |
virtual void | drawInfo ()=0 |
Draw info screen. | |
virtual void | clear ()=0 |
Clear screen. | |
virtual void | setCursor (uint8_t col, uint8_t row)=0 |
Set cursor to coordinates. | |
virtual bool | handleInput (Buttons state, uint16_t pressedFor)=0 |
Handle input. | |
+Private Attributes | |
Print & | display |
const ButtonReader & | buttonReader |
unsigned long | lastPressed = 0 |
Last time a keypress event occurred (in millis) | |
const uint16_t | buttonDebounceInterval = config::buttonDebounceInterval |
const uint16_t | inputInterval = config::inputInterval |
const uint16_t | blinkInterval = config::blinkInterval |
const uint16_t | splashDuration = config::splashDuration |
const uint16_t | infoDuration = config::infoDuration |
bool | splashDrawn = false |
bool | infoDrawn = false |
bool | screenCleared = false |
User interface (display and input) for humidistat. Hold references to ButtonReader for keypad input, and Humidistat for updating the humidity setpoint.
+ +Definition at line 15 of file ControllerUI.h.
+
+
|
+ +explicitprotected | +
Constructor.
+display | Pointer to a Print instance |
buttonReader | Pointer to a ButtonReader instance |
trs | Span over 4 ThermistorReader instances |
Definition at line 3 of file ControllerUI.cpp.
+ +
+
|
+ +staticprotected | +
In-/de-crement a variable, while clipping it to [min, max].
+delta | The amount by which to in-/de-crement |
value | Value to adjust |
min | Lower limit |
max | Upper limit |
Definition at line 67 of file ControllerUI.cpp.
+
+
|
+ +pure virtual | +
Initialize the display.
+ +Implemented in CharDisplayUI, and GraphicalDisplayUI< Humidistat_t >.
+ +
+
|
+ +protected | +
Print blinking text.
+col | LCD column |
row | LCD row |
buf | Buffer of text to blink |
Definition at line 43 of file ControllerUI.cpp.
+
+
|
+ +privatepure virtual | +
Clear screen.
+ +Implemented in CharDisplayUI, and GraphicalDisplayUI< Humidistat_t >.
+
+
|
+ +privatepure virtual | +
Draw main interface (main loop).
+ +Implemented in CharDisplayUI, and GraphicalDisplayUI< Humidistat_t >.
+
+
|
+ +privatepure virtual | +
Draw info screen.
+ +Implemented in CharDisplayUI, and GraphicalDisplayUI< Humidistat_t >.
+
+
|
+ +privatepure virtual | +
Draw splash screen.
+ +Implemented in CharDisplayUI, and GraphicalDisplayUI< Humidistat_t >.
+
+
|
+ +privatepure virtual | +
Handle input.
+state | Keypad state |
pressedFor | Duration the key has been pressed (in millis) |
Implemented in CharDisplayUI, and GraphicalDisplayUI< Humidistat_t >.
+
+
|
+ +inlineprotected | +
Print formatted data to display, at (col, row). Calculates lengths and creates appropriate buffer internally.
+col | LCD column |
row | LCD row |
fmt | Format string |
args | Arguments specifying data to print |
Definition at line 92 of file ControllerUI.h.
+
+
|
+ +protected | +
Print temperature read from thermistors. Handles NaN values as 0.
+col | LCD column |
row | LCD row |
i | ThermistorReader index |
Definition at line 58 of file ControllerUI.cpp.
+
+
|
+ +privatepure virtual | +
Set cursor to coordinates.
+col | LCD column |
row | LCD row |
Implemented in CharDisplayUI, and GraphicalDisplayUI< Humidistat_t >.
+void ControllerUI::update | +( | +) | ++ |
Update the display and handle input: set Humidistat's setpoint.
+ +Definition at line 6 of file ControllerUI.cpp.
+
+
|
+ +protected | +
Definition at line 58 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 24 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 22 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 18 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 17 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 29 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 26 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 23 of file ControllerUI.h.
+ +
+
|
+ +private | +
Last time a keypress event occurred (in millis)
+ +Definition at line 20 of file ControllerUI.h.
+ +
+
|
+ +protected | +
Last time display was updated (in millis)
+ +Definition at line 55 of file ControllerUI.h.
+ +
+
|
+ +protected | +
Definition at line 57 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 30 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 28 of file ControllerUI.h.
+ +
+
|
+ +private | +
Definition at line 25 of file ControllerUI.h.
+ +
+
|
+ +protected | +
Definition at line 59 of file ControllerUI.h.
+ +
+
|
+ +protected | +
Definition at line 53 of file ControllerUI.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for DHTHumiditySensor, including all inherited members.
+begin() | DHTHumiditySensor | |
dht | DHTHumiditySensor | private |
DHTHumiditySensor(DHT *dht) | DHTHumiditySensor | explicit |
getHumidity() const | DHTHumiditySensor | |
getTemperature() const | DHTHumiditySensor | |
readSample() | DHTHumiditySensor |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Implementation of the HumiditySensor interface for the DHT22/AM2302 sensor. + More...
+ +#include <DHTHumiditySensor.h>
+Public Member Functions | |
DHTHumiditySensor (DHT *dht) | |
double | getHumidity () const |
double | getTemperature () const |
void | begin () |
void | readSample () |
+Private Attributes | |
DHT & | dht |
Implementation of the HumiditySensor interface for the DHT22/AM2302 sensor.
+ +Definition at line 7 of file DHTHumiditySensor.h.
+
+
|
+ +explicit | +
Definition at line 3 of file DHTHumiditySensor.cpp.
+ +void DHTHumiditySensor::begin | +( | +) | ++ |
Definition at line 13 of file DHTHumiditySensor.cpp.
+ +double DHTHumiditySensor::getHumidity | +( | +) | +const | +
Definition at line 5 of file DHTHumiditySensor.cpp.
+ +double DHTHumiditySensor::getTemperature | +( | +) | +const | +
Definition at line 9 of file DHTHumiditySensor.cpp.
+ +void DHTHumiditySensor::readSample | +( | +) | ++ |
Definition at line 17 of file DHTHumiditySensor.cpp.
+ +
+
|
+ +private | +
Definition at line 9 of file DHTHumiditySensor.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for EEPROMConfig, including all inherited members.
+address | EEPROMConfig | private |
configStore | EEPROMConfig | |
EEPROMConfig() | EEPROMConfig | |
load() | EEPROMConfig | |
reset() | EEPROMConfig | |
save() const | EEPROMConfig |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Load/save an (internal) ConfigStore in EEPROM. + More...
+ +#include <EEPROMConfig.h>
+Public Member Functions | |
EEPROMConfig () | |
Constructor. | |
bool | load () |
Load config values from EEPROM into configStore. | |
uint16_t | save () const |
Saves current content of configStore into EEPROM. | |
void | reset () |
Reset the config store: overwrite the configStore with the default values. | |
+Public Attributes | |
ConfigStore | configStore |
+Private Attributes | |
uint8_t | address = config::EEPROMAddress |
Load/save an (internal) ConfigStore in EEPROM.
+ +Definition at line 60 of file EEPROMConfig.h.
+EEPROMConfig::EEPROMConfig | +( | +) | ++ |
Constructor.
+ +Definition at line 25 of file EEPROMConfig.cpp.
+bool EEPROMConfig::load | +( | +) | ++ |
Load config values from EEPROM into configStore.
+Definition at line 5 of file EEPROMConfig.cpp.
+void EEPROMConfig::reset | +( | +) | ++ |
Reset the config store: overwrite the configStore with the default values.
+ +Definition at line 29 of file EEPROMConfig.cpp.
+uint16_t EEPROMConfig::save | +( | +) | +const | +
Saves current content of configStore into EEPROM.
+Definition at line 21 of file EEPROMConfig.cpp.
+
+
|
+ +private | +
Definition at line 62 of file EEPROMConfig.h.
+ +ConfigStore EEPROMConfig::configStore | +
Definition at line 65 of file EEPROMConfig.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for FlowController, including all inherited members.
+active | Controller | |
Controller(const ConfigStore *cs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double defaultSP, double defaultCV) | Controller | |
cs | Controller | protected |
cv | Controller | |
FlowController(const FlowSensor *fs, const ConfigStore *cs, uint8_t solenoidPin, uint8_t pwmRes) | FlowController | |
fs | FlowController | private |
getConfigStore() | Controller | |
getTerms(double &pTerm, double &iTerm, double &dTerm) const | Controller | |
pid | Controller | protected |
pv | Controller | |
pwmRes | FlowController | private |
sensorLastRead | Controller | protected |
solenoidPin | FlowController | private |
sp | Controller | |
update() | FlowController | |
updatePIDParameters() | FlowController |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Controls flow. Holds a reference to a FlowSensor instance. + More...
+ +#include <FlowController.h>
+Public Member Functions | |
FlowController (const FlowSensor *fs, const ConfigStore *cs, uint8_t solenoidPin, uint8_t pwmRes) | |
Constructor. | |
void | update () |
void | updatePIDParameters () |
Public Member Functions inherited from Controller | |
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. | |
+Private Attributes | |
const FlowSensor & | fs |
const uint8_t | solenoidPin |
const uint8_t | pwmRes |
+Additional Inherited Members | |
Public Attributes inherited from Controller | |
bool | active = false |
double | pv = 0 |
Process variable. | |
double | sp |
Setpoint. | |
double | cv |
Control variable. | |
Protected Attributes inherited from Controller | |
PID | pid |
const ConfigStore & | cs |
unsigned long | sensorLastRead = 0 |
Controls flow. Holds a reference to a FlowSensor instance.
+ +Definition at line 11 of file FlowController.h.
+FlowController::FlowController | +( | +const FlowSensor * | fs, | +
+ | + | const ConfigStore * | cs, | +
+ | + | uint8_t | solenoidPin, | +
+ | + | uint8_t | pwmRes ) | +
Constructor.
+fs | Pointer to a FlowSensor instance |
cs | Pointer to a ConfigStore instance |
solenoidPin | Solenoid pin |
pwmRes | PWM resolution (bits) |
Definition at line 5 of file FlowController.cpp.
+ +void FlowController::update | +( | +) | ++ |
Definition at line 9 of file FlowController.cpp.
+void FlowController::updatePIDParameters | +( | +) | ++ |
Definition at line 28 of file FlowController.cpp.
+
+
|
+ +private | +
Definition at line 13 of file FlowController.h.
+ +
+
|
+ +private | +
Definition at line 15 of file FlowController.h.
+ +
+
|
+ +private | +
Definition at line 14 of file FlowController.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for FlowSensor, including all inherited members.
+coeffs | FlowSensor | privatestatic |
FlowSensor(uint8_t pin) | FlowSensor | explicit |
pin | FlowSensor | private |
readFlowrate() const | FlowSensor |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Read flow rate using a Omron D6F-P0010 MEMS flow sensor. + More...
+ +#include <FlowSensor.h>
+Public Member Functions | |
FlowSensor (uint8_t pin) | |
Constructor. | |
double | readFlowrate () const |
Read the flow rate. | |
+Private Attributes | |
const uint8_t | pin |
+Static Private Attributes | |
static constexpr double | coeffs [] |
Coefficients of the polynomial approximation to the sensor response (and voltage mapping) | |
Read flow rate using a Omron D6F-P0010 MEMS flow sensor.
+ +Definition at line 9 of file FlowSensor.h.
+
+
|
+ +explicit | +
Constructor.
+pin | Sensor pin number |
Definition at line 6 of file FlowSensor.cpp.
+ +double FlowSensor::readFlowrate | +( | +) | +const | +
Read the flow rate.
+Definition at line 8 of file FlowSensor.cpp.
+
+
|
+ +staticconstexprprivate | +
Coefficients of the polynomial approximation to the sensor response (and voltage mapping)
+ +Definition at line 13 of file FlowSensor.h.
+ +
+
|
+ +private | +
Definition at line 11 of file FlowSensor.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for GraphicalDisplayUI< Humidistat_t >, including all inherited members.
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
TUI for 128*64 px graphical display using U8g2. Holds references to a U8g2lib instance for writing to display, an EEPROMConfig instance to edit the config, and to a Humidistat instance to show/edit its state. + More...
+ +#include <GraphicalDisplayUI.h>
+Public Member Functions | |
void | begin () override |
Initialize the display. | |
GraphicalDisplayUI (U8G2 *u8g2, const ButtonReader *buttonReader, SingleHumidistat *humidistat, etl::span< const ThermistorReader, 4 > trs, EEPROMConfig *eepromConfig, SetpointProfileRunner *spr) | |
Constructor. | |
GraphicalDisplayUI (U8G2 *u8g2, const ButtonReader *buttonReader, CascadeHumidistat *humidistat, etl::span< const ThermistorReader, 4 > trs, EEPROMConfig *eepromConfig, SetpointProfileRunner *spr) | |
Public Member Functions inherited from ControllerUI | |
void | update () |
Update the display and handle input: set Humidistat's setpoint. | |
+Private Types | |
enum class | Tab { main +, info +, config +, _last = config + } |
Tab definitions. More... | |
enum class | Selection { par +, number +, actions + } |
Config tab selection definitions. More... | |
enum class | Action { save +, reset +, _last = reset + } |
Config tab action definitions. More... | |
+Private Member Functions | |
void | drawMain () |
Draw the Main tab. | |
void | drawTabInfo () |
void | drawConfig () |
Draw the Config tab. | |
void | DrawMainCommon () |
Draw common elements in Main tab. | |
void | drawTabBar () |
Draw the tab bar. | |
bool | handleInput (Buttons state, uint16_t pressedFor) override |
Handle input. | |
bool | handleInputMain (Buttons state, uint16_t pressedFor) |
Handle input on the Main tab. | |
bool | handleInputInfo (Buttons state, uint16_t pressedFor) |
Handle input on the Info tab. | |
bool | handleInputConfig (Buttons state, uint8_t pressedFor) |
Handle input on the Config tab. | |
void | draw () override |
Draw main interface (main loop). | |
void | drawSplash () override |
Draw splash screen. | |
void | drawInfo () override |
Draw info screen. | |
void | clear () override |
Clear screen. | |
void | setCursor (uint8_t col, uint8_t row) override |
Set cursor to coordinates. | |
void | drawMain () |
void | drawMain () |
+Private Attributes | |
U8G2 & | u8g2 |
EEPROMConfig & | eepromConfig |
Humidistat_t & | humidistat |
SetpointProfileRunner & | spr |
Tab | currentTab = Tab::main |
Currently active tab. | |
uint8_t | currentPar = 0 |
Currently active config parameter. | |
Selection | currentSelection = Selection::par |
Action | currentAction = Action::save |
uint8_t | currentDigit = NUM_DIGITS - 1 |
uint8_t | currentSPProfile = 0 |
uint8_t | frame = 0 |
Frame counter (overflows, but that's OK) | |
uint8_t | configSaveTimer = 0 |
Timer containing the current value of the cooldown on saving config to EEPROM. | |
const uint16_t | longPressDuration = config::longPressDuration |
const uint8_t | configSaveCooldown = config::configSaveCooldown |
const uint8_t | nConfigPars |
Total number of config parameters. | |
const ConfigPar | configPars [13] |
Array of config parameters. | |
+Additional Inherited Members | |
Protected Member Functions inherited from ControllerUI | |
ControllerUI (Print *display, const ButtonReader *buttonReader, etl::span< const ThermistorReader, 4 > trs) | |
Constructor. | |
void | blink (uint8_t col, uint8_t row, const char *buf) |
Print blinking text. | |
void | printNTC (uint8_t col, uint8_t row, uint8_t i) |
Print temperature read from thermistors. Handles NaN values as 0. | |
template<typename... T> | |
void | printf (uint8_t col, uint8_t row, const char *fmt, T... args) |
Print formatted data to display, at (col, row). Calculates lengths and creates appropriate buffer internally. | |
Static Protected Member Functions inherited from ControllerUI | |
static void | adjustValue (double delta, double &value, uint8_t min, uint8_t max) |
In-/de-crement a variable, while clipping it to [min, max]. | |
Protected Attributes inherited from ControllerUI | |
etl::span< const ThermistorReader, 4 > | trs |
unsigned long | lastRefreshed = 0 |
Last time display was updated (in millis) | |
const uint16_t | refreshInterval = config::refreshInterval |
const uint8_t | adjustStep = config::adjustStep |
const double | tolerance = config::tolerance |
TUI for 128*64 px graphical display using U8g2. Holds references to a U8g2lib instance for writing to display, an EEPROMConfig instance to edit the config, and to a Humidistat instance to show/edit its state.
+Humidistat_t | Either SingleHumidistat or CascadeHumidistat |
Definition at line 24 of file GraphicalDisplayUI.h.
+
+
|
+ +strongprivate | +
Config tab action definitions.
+Enumerator | |
---|---|
save | |
reset | |
_last |
Definition at line 42 of file GraphicalDisplayUI.h.
+ +
+
|
+ +strongprivate | +
Config tab selection definitions.
+Enumerator | |
---|---|
par | |
number | |
actions |
Definition at line 35 of file GraphicalDisplayUI.h.
+ +
+
|
+ +strongprivate | +
Tab definitions.
+Enumerator | |
---|---|
main | |
info | |
config | |
_last |
Definition at line 27 of file GraphicalDisplayUI.h.
+ +
+
|
+ +inlineexplicit | +
Constructor.
+u8g2 | Pointer to a U8G2 instance |
buttonReader | Pointer to a ButtonReader instance |
humidistat | Pointer to a Humidistat instance |
trs | Span over 4 ThermistorReader instances |
eepromConfig | Pointer to a EEPROMConfig instance |
spr | Pointer to a SetpointProfileRunner instance |
Definition at line 521 of file GraphicalDisplayUI.h.
+ +
+
|
+ +inlineexplicit | +
Definition at line 534 of file GraphicalDisplayUI.h.
+ +
+
|
+ +inlineoverridevirtual | +
Initialize the display.
+ +Implements ControllerUI.
+ +Definition at line 555 of file GraphicalDisplayUI.h.
+ +
+
|
+ +inlineoverrideprivatevirtual | +
Clear screen.
+ +Implements ControllerUI.
+ +Definition at line 504 of file GraphicalDisplayUI.h.
+ +
+
|
+ +inlineoverrideprivatevirtual | +
Draw main interface (main loop).
+ +Implements ControllerUI.
+ +Definition at line 462 of file GraphicalDisplayUI.h.
+
+
|
+ +inlineprivate | +
Draw the Config tab.
+ +Definition at line 121 of file GraphicalDisplayUI.h.
+
+
|
+ +inlineoverrideprivatevirtual | +
Draw info screen.
+ +Implements ControllerUI.
+ +Definition at line 502 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Draw the Main tab.
+
+
|
+ +private | +
Definition at line 562 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 585 of file GraphicalDisplayUI.h.
+ +
+
|
+ +inlineprivate | +
Draw common elements in Main tab.
+ +Definition at line 231 of file GraphicalDisplayUI.h.
+
+
|
+ +inlineoverrideprivatevirtual | +
Draw splash screen.
+ +Implements ControllerUI.
+ +Definition at line 488 of file GraphicalDisplayUI.h.
+ +
+
|
+ +inlineprivate | +
Draw the tab bar.
+ +Definition at line 308 of file GraphicalDisplayUI.h.
+
+
|
+ +inlineprivate | +
Definition at line 74 of file GraphicalDisplayUI.h.
+
+
|
+ +inlineoverrideprivatevirtual | +
Handle input.
+state | Keypad state |
pressedFor | Duration the key has been pressed (in millis) |
Implements ControllerUI.
+ +Definition at line 318 of file GraphicalDisplayUI.h.
+
+
|
+ +inlineprivate | +
Handle input on the Config tab.
+ +Definition at line 384 of file GraphicalDisplayUI.h.
+
+
|
+ +inlineprivate | +
Handle input on the Info tab.
+ +Definition at line 369 of file GraphicalDisplayUI.h.
+
+
|
+ +inlineprivate | +
Handle input on the Main tab.
+ +Definition at line 336 of file GraphicalDisplayUI.h.
+
+
|
+ +inlineoverrideprivatevirtual | +
Set cursor to coordinates.
+col | LCD column |
row | LCD row |
Implements ControllerUI.
+ +Definition at line 508 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Array of config parameters.
+ +Definition at line 68 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 65 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Timer containing the current value of the cooldown on saving config to EEPROM.
+ +Definition at line 62 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 57 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 58 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Currently active config parameter.
+ +Definition at line 55 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 56 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 59 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Currently active tab.
+ +Definition at line 54 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 49 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Frame counter (overflows, but that's OK)
+ +Definition at line 61 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 50 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 64 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Total number of config parameters.
+ +Definition at line 67 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 51 of file GraphicalDisplayUI.h.
+ +
+
|
+ +private | +
Definition at line 48 of file GraphicalDisplayUI.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for Humidistat, including all inherited members.
+active | Controller | |
Controller(const ConfigStore *cs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double defaultSP, double defaultCV) | Controller | |
cs | Controller | protected |
cv | Controller | |
getConfigStore() | Controller | |
getCvMax() const | Humidistat | |
getCvMin() const | Humidistat | |
getHumidity() const | Humidistat | |
getTemperature() const | Humidistat | |
getTerms(double &pTerm, double &iTerm, double &dTerm) const | Controller | |
hs | Humidistat | protected |
Humidistat(const ConfigStore *cs, HumiditySensor *hs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax) | Humidistat | |
pid | Controller | protected |
pv | Controller | |
runCycle() | Humidistat | protected |
sensorLastRead | Controller | protected |
sp | Controller | |
update() | Controller | |
updatePIDParameters() | Controller |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Base class for a humidistat. Holds a reference to a HumiditySensor instance. + More...
+ +#include <Humidistat.h>
+Public Member Functions | |
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 |
Public Member Functions inherited from Controller | |
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. | |
+Protected Member Functions | |
void | runCycle () |
Run a cycle of the controller. Reads a sample from the humidity controller and runs PID. | |
+Protected Attributes | |
HumiditySensor & | hs |
Protected Attributes inherited from Controller | |
PID | pid |
const ConfigStore & | cs |
unsigned long | sensorLastRead = 0 |
+Additional Inherited Members | |
Public Attributes inherited from Controller | |
bool | active = false |
double | pv = 0 |
Process variable. | |
double | sp |
Setpoint. | |
double | cv |
Control variable. | |
Base class for a humidistat. Holds a reference to a HumiditySensor instance.
+ +Definition at line 10 of file Humidistat.h.
+Humidistat::Humidistat | +( | +const ConfigStore * | cs, | +
+ | + | HumiditySensor * | hs, | +
+ | + | double | Kp, | +
+ | + | double | Ki, | +
+ | + | double | Kd, | +
+ | + | double | Kf, | +
+ | + | uint16_t | dt, | +
+ | + | double | cvMin, | +
+ | + | double | cvMax ) | +
Constructor.
+cs | Pointer to a ConfigStore instance |
hs | Pointer to a HumiditySensor instance |
Kp | Proportional gain |
Ki | Integral gain (in 1/s) |
Kd | Derivative gain (in s) |
Kf | Feed-forward gain |
dt | Timestep (in ms) |
cvMin | Lower limit for control value |
cvMax | Upper limit for control value |
Definition at line 3 of file Humidistat.cpp.
+ +double Humidistat::getCvMax | +( | +) | +const | +
Definition at line 35 of file Humidistat.cpp.
+double Humidistat::getCvMin | +( | +) | +const | +
Definition at line 31 of file Humidistat.cpp.
+double Humidistat::getHumidity | +( | +) | +const | +
Read the humidity.
+Definition at line 7 of file Humidistat.cpp.
+double Humidistat::getTemperature | +( | +) | +const | +
Read the temperature.
+Definition at line 11 of file Humidistat.cpp.
+
+
|
+ +protected | +
Run a cycle of the controller. Reads a sample from the humidity controller and runs PID.
+ +Definition at line 15 of file Humidistat.cpp.
+
+
|
+ +protected | +
Definition at line 12 of file Humidistat.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for Ks0256VoltLadder, including all inherited members.
+voltageToButton(uint16_t voltage) const | Ks0256VoltLadder |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Implementation of the VoltLadder interface for the Keyestudio Ks0256 keypad. + More...
+ +#include <Ks0256VoltLadder.h>
+Public Member Functions | |
Buttons | voltageToButton (uint16_t voltage) const |
Implementation of the VoltLadder interface for the Keyestudio Ks0256 keypad.
+ +Definition at line 9 of file Ks0256VoltLadder.h.
+Buttons Ks0256VoltLadder::voltageToButton | +( | +uint16_t | voltage | ) | +const | +
Definition at line 3 of file Ks0256VoltLadder.cpp.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for Ks0466VoltLadder, including all inherited members.
+voltageToButton(uint16_t voltage) const | Ks0466VoltLadder |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Implementation of the VoltLadder interface for the Keyestudio Ks0466 keypad. + More...
+ +#include <Ks0466VoltLadder.h>
+Public Member Functions | |
Buttons | voltageToButton (uint16_t voltage) const |
Implementation of the VoltLadder interface for the Keyestudio Ks0466 keypad.
+ +Definition at line 9 of file Ks0466VoltLadder.h.
+Buttons Ks0466VoltLadder::voltageToButton | +( | +uint16_t | voltage | ) | +const | +
Definition at line 3 of file Ks0466VoltLadder.cpp.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for PID, including all inherited members.
+a | PID | private |
clip(double value) const | PID | private |
compute() | PID | |
cv | PID | private |
cvMax | PID | |
cvMin | PID | |
dt | PID | private |
dTerm | PID | |
fTerm | PID | |
inAuto | PID | private |
init() | PID | private |
integral | PID | private |
iTerm | PID | |
Kd | PID | private |
Kf | PID | private |
Ki | PID | private |
Kp | PID | private |
lastDPV | PID | private |
lastE | PID | private |
lastPv | PID | private |
PID(const double *pv, double *cv, const double *sp, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double a) | PID | |
pTerm | PID | |
pv | PID | private |
setAuto(bool inAuto) | PID | |
setGains(double Kp, double Ki, double Kd, double Kf, uint16_t dt) | PID | |
sp | PID | private |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
PID controller in parallel form implemented in floating-point arithmetic. Features Derivative-on-Measurement, anti-windup through conditional integration, bumpless transfer, and feed-forward. + More...
+ +#include <PID.h>
+Public Member Functions | |
PID (const double *pv, double *cv, const double *sp, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double a) | |
Constructor. | |
bool | compute () |
Run a cycle of the PID loop. | |
void | setAuto (bool inAuto) |
Set the mode of the controller. | |
void | setGains (double Kp, double Ki, double Kd, double Kf, uint16_t dt) |
Set the gains and timestep. | |
+Public Attributes | |
double | pTerm = 0 |
double | iTerm = 0 |
double | dTerm = 0 |
double | fTerm = 0 |
PID terms. | |
double | cvMin |
double | cvMax |
Lower/upper limits for cv. | |
+Private Member Functions | |
void | init () |
Method to be called when the controller goes from manual to auto mode for proper bumpless transfer. | |
double | clip (double value) const |
Clip value to [cvMin, cvMax]. | |
+Private Attributes | |
const double & | pv |
Process variable. | |
double & | cv |
Control variable. | |
const double & | sp |
Setpoint. | |
double | Kp |
double | Ki |
double | Kd |
double | Kf |
Gains. | |
double | a |
Smoothing factor for EWA filter for derivative. | |
uint16_t | dt |
Timestep. | |
bool | inAuto = false |
Mode. | |
double | lastPv |
Last value of pv. | |
double | lastE |
Last value of error. | |
double | lastDPV |
Last value of derivative term. | |
double | integral |
Integral of pv. | |
PID controller in parallel form implemented in floating-point arithmetic. Features Derivative-on-Measurement, anti-windup through conditional integration, bumpless transfer, and feed-forward.
+ + +PID::PID | +( | +const double * | pv, | +
+ | + | double * | cv, | +
+ | + | const double * | sp, | +
+ | + | double | Kp, | +
+ | + | double | Ki, | +
+ | + | double | Kd, | +
+ | + | double | Kf, | +
+ | + | uint16_t | dt, | +
+ | + | double | cvMin, | +
+ | + | double | cvMax, | +
+ | + | double | a ) | +
Constructor.
+pv | Pointer to process variable |
cv | Pointer to control value |
sp | Pointer to setpoint |
Kp | Proportional gain |
Ki | Integral gain (in 1/s) |
Kd | Derivative gain (in s) |
Kf | Feed-forward gain |
dt | Timestep (in ms) |
cvMin | Lower limit for control value |
cvMax | Upper limit for control value |
a | Smoothing factor for EWA filter for derivative |
Definition at line 3 of file PID.cpp.
+
+
|
+ +private | +
bool PID::compute | +( | +) | ++ |
+
|
+ +private | +
void PID::setAuto | +( | +bool | inAuto | ) | ++ |
void PID::setGains | +( | +double | Kp, | +
+ | + | double | Ki, | +
+ | + | double | Kd, | +
+ | + | double | Kf, | +
+ | + | uint16_t | dt ) | +
Set the gains and timestep.
+Kp | Proportional gain |
Ki | Integral gain (in 1/s) |
Kd | Derivative gain (in s) |
Kf | Feed-forward gain |
dt | Timestep (in ms) |
Definition at line 59 of file PID.cpp.
+
+
|
+ +private | +
+
|
+ +private | +
double PID::cvMax | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for SHTHumiditySensor, including all inherited members.
+begin() | SHTHumiditySensor | |
getHumidity() const | SHTHumiditySensor | |
getTemperature() const | SHTHumiditySensor | |
h | SHTHumiditySensor | private |
readSample() | SHTHumiditySensor | |
sht | SHTHumiditySensor | private |
SHTHumiditySensor(SHTSensor *sht) | SHTHumiditySensor | explicit |
t | SHTHumiditySensor | private |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Implementation of the HumiditySensor interface for the Sensirion SHT85 sensor. + More...
+ +#include <SHTHumiditySensor.h>
+Public Member Functions | |
SHTHumiditySensor (SHTSensor *sht) | |
double | getHumidity () const |
double | getTemperature () const |
void | begin () |
void | readSample () |
+Private Attributes | |
SHTSensor & | sht |
double | t = NAN |
double | h = NAN |
Implementation of the HumiditySensor interface for the Sensirion SHT85 sensor.
+ +Definition at line 9 of file SHTHumiditySensor.h.
+
+
|
+ +explicit | +
Definition at line 3 of file SHTHumiditySensor.cpp.
+ +void SHTHumiditySensor::begin | +( | +) | ++ |
Definition at line 13 of file SHTHumiditySensor.cpp.
+ +double SHTHumiditySensor::getHumidity | +( | +) | +const | +
Definition at line 5 of file SHTHumiditySensor.cpp.
+ +double SHTHumiditySensor::getTemperature | +( | +) | +const | +
Definition at line 9 of file SHTHumiditySensor.cpp.
+ +void SHTHumiditySensor::readSample | +( | +) | ++ |
Definition at line 18 of file SHTHumiditySensor.cpp.
+ +
+
|
+ +private | +
Definition at line 13 of file SHTHumiditySensor.h.
+ +
+
|
+ +private | +
Definition at line 11 of file SHTHumiditySensor.h.
+ +
+
|
+ +private | +
Definition at line 13 of file SHTHumiditySensor.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for SerialLogger< Humidistat_t >, including all inherited members.
+begin(uint32_t baud) | SerialLogger< Humidistat_t > | inlinestatic |
header | SerialLogger< Humidistat_t > | privatestatic |
header[] | SerialLogger< Humidistat_t > | private |
header[] | SerialLogger< Humidistat_t > | private |
humidistat | SerialLogger< Humidistat_t > | private |
interval | SerialLogger< Humidistat_t > | private |
lastTime | SerialLogger< Humidistat_t > | private |
log() | SerialLogger< Humidistat_t > | private |
log() | SerialLogger< Humidistat_t > | private |
log() | SerialLogger< Humidistat_t > | private |
ready | SerialLogger< Humidistat_t > | private |
SerialLogger(const Humidistat_t *humidistat, etl::span< const ThermistorReader, 4 > trs, uint16_t interval) | SerialLogger< Humidistat_t > | inlineexplicit |
trs | SerialLogger< Humidistat_t > | private |
update() | SerialLogger< Humidistat_t > | inline |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Logs humidistat data over serial. + More...
+ +#include <SerialLogger.h>
+Public Member Functions | |
SerialLogger (const Humidistat_t *humidistat, etl::span< const ThermistorReader, 4 > trs, uint16_t interval) | |
Constructor. | |
void | update () |
Log a line every interval, once data has been received. | |
+Static Public Member Functions | |
static void | begin (uint32_t baud) |
Setup the serial interface. | |
+Private Member Functions | |
void | log () |
Write a line to serial. | |
const char | header [] |
const char | header [] |
void | log () |
void | log () |
+Private Attributes | |
const Humidistat_t & | humidistat |
const etl::span< const ThermistorReader, 4 > | trs |
const uint16_t | interval |
Logging interval (in millis) | |
unsigned long | lastTime = 0 |
Last time line was written (in millis) | |
bool | ready = false |
+Static Private Attributes | |
static const char | header [] |
Logs humidistat data over serial.
+Humidistat_t | Either SingleHumidistat or CascadeHumidistat |
Definition at line 15 of file SerialLogger.h.
+
+
|
+ +inlineexplicit | +
Constructor.
+humidistat | Pointer to a Humidistat instance |
trs | Span over 4 ThermistorReader instances |
interval | Logging interval (in ms) |
Definition at line 35 of file SerialLogger.h.
+ +
+
|
+ +inlinestatic | +
Setup the serial interface.
+ +Definition at line 39 of file SerialLogger.h.
+ +
+
|
+ +private | +
Definition at line 70 of file SerialLogger.h.
+ +
+
|
+ +private | +
Definition at line 74 of file SerialLogger.h.
+ +
+
|
+ +private | +
Write a line to serial.
+
+
|
+ +private | +
Definition at line 79 of file SerialLogger.h.
+
+
|
+ +private | +
Definition at line 103 of file SerialLogger.h.
+
+
|
+ +inline | +
Log a line every interval, once data has been received.
+ +Definition at line 46 of file SerialLogger.h.
+
+
|
+ +staticprivate | +
Definition at line 21 of file SerialLogger.h.
+ +
+
|
+ +private | +
Definition at line 17 of file SerialLogger.h.
+ +
+
|
+ +private | +
Logging interval (in millis)
+ +Definition at line 23 of file SerialLogger.h.
+ +
+
|
+ +private | +
Last time line was written (in millis)
+ +Definition at line 24 of file SerialLogger.h.
+ +
+
|
+ +private | +
Definition at line 25 of file SerialLogger.h.
+ +
+
|
+ +private | +
Definition at line 18 of file SerialLogger.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for SetpointProfileRunner, including all inherited members.
+getCurrentPoint() const | SetpointProfileRunner | |
humidistat | SetpointProfileRunner | private |
isRunning() const | SetpointProfileRunner | |
profile | SetpointProfileRunner | private |
running | SetpointProfileRunner | private |
SetpointProfileRunner(Humidistat *humidistat) | SetpointProfileRunner | explicit |
setProfile(const etl::span< const Point > &profile) | SetpointProfileRunner | |
timeStart | SetpointProfileRunner | private |
toggle() | SetpointProfileRunner | |
update() | SetpointProfileRunner |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
'Runs' a setpoint profile. + More...
+ +#include <SetpointProfileRunner.h>
+Public Member Functions | |
SetpointProfileRunner (Humidistat *humidistat) | |
Constructor. | |
void | toggle () |
Toggle the run state. | |
void | setProfile (const etl::span< const Point > &profile) |
Set the profile. | |
void | update () |
Run the profile (if running). Call this periodically. | |
bool | isRunning () const |
Get the run state. | |
size_t | getCurrentPoint () const |
Get the index of the current Point in the profile. | |
+Private Attributes | |
Humidistat & | humidistat |
etl::span< const Point > | profile |
uint32_t | timeStart |
bool | running = false |
'Runs' a setpoint profile.
+ +Definition at line 10 of file SetpointProfileRunner.h.
+
+
|
+ +explicit | +
Constructor.
+humidistat | Pointer to a Humidistat instance |
Definition at line 3 of file SetpointProfileRunner.cpp.
+ +
+
|
+ +nodiscard | +
Get the index of the current Point in the profile.
+Definition at line 32 of file SetpointProfileRunner.cpp.
+
+
|
+ +nodiscard | +
Get the run state.
+Definition at line 28 of file SetpointProfileRunner.cpp.
+void SetpointProfileRunner::setProfile | +( | +const etl::span< const Point > & | profile | ) | ++ |
Set the profile.
+profile | Span over Points |
Definition at line 24 of file SetpointProfileRunner.cpp.
+void SetpointProfileRunner::toggle | +( | +) | ++ |
Toggle the run state.
+ +Definition at line 19 of file SetpointProfileRunner.cpp.
+void SetpointProfileRunner::update | +( | +) | ++ |
Run the profile (if running). Call this periodically.
+ +Definition at line 6 of file SetpointProfileRunner.cpp.
+
+
|
+ +private | +
Definition at line 12 of file SetpointProfileRunner.h.
+ +
+
|
+ +private | +
Definition at line 13 of file SetpointProfileRunner.h.
+ +
+
|
+ +private | +
Definition at line 15 of file SetpointProfileRunner.h.
+ +
+
|
+ +private | +
Definition at line 14 of file SetpointProfileRunner.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for SingleHumidistat, including all inherited members.
+active | Controller | |
Controller(const ConfigStore *cs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double defaultSP, double defaultCV) | Controller | |
cs | Controller | protected |
cv | Controller | |
getConfigStore() | Controller | |
getCvMax() const | Humidistat | |
getCvMin() const | Humidistat | |
getHumidity() const | Humidistat | |
getTemperature() const | Humidistat | |
getTerms(double &pTerm, double &iTerm, double &dTerm) const | Controller | |
hs | Humidistat | protected |
Humidistat(const ConfigStore *cs, HumiditySensor *hs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax) | Humidistat | |
pid | Controller | protected |
pins_solenoid | SingleHumidistat | private |
pv | Controller | |
pwmRes | SingleHumidistat | private |
runCycle() | Humidistat | protected |
sensorLastRead | Controller | protected |
SingleHumidistat(HumiditySensor *hs, const ConfigStore *cs, etl::array< uint8_t, 2 > pins_solenoid, uint8_t pwmRes) | SingleHumidistat | |
sp | Controller | |
update() | SingleHumidistat | |
updatePIDParameters() | SingleHumidistat |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Control humidity using PID by driving two solenoid valves. Adjust the public setpoint variable and call update(). + More...
+ +#include <SingleHumidistat.h>
+Public Member Functions | |
SingleHumidistat (HumiditySensor *hs, const ConfigStore *cs, etl::array< uint8_t, 2 > pins_solenoid, uint8_t pwmRes) | |
Constructor. | |
void | update () |
void | updatePIDParameters () |
Public Member Functions inherited from Humidistat | |
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 |
Public Member Functions inherited from Controller | |
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. | |
+Private Attributes | |
const uint8_t | pins_solenoid [2] |
const uint8_t | pwmRes |
+Additional Inherited Members | |
Public Attributes inherited from Controller | |
bool | active = false |
double | pv = 0 |
Process variable. | |
double | sp |
Setpoint. | |
double | cv |
Control variable. | |
Protected Member Functions inherited from Humidistat | |
void | runCycle () |
Run a cycle of the controller. Reads a sample from the humidity controller and runs PID. | |
Protected Attributes inherited from Humidistat | |
HumiditySensor & | hs |
Protected Attributes inherited from Controller | |
PID | pid |
const ConfigStore & | cs |
unsigned long | sensorLastRead = 0 |
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 | +( | +HumiditySensor * | hs, | +
+ | + | const ConfigStore * | cs, | +
+ | + | etl::array< uint8_t, 2 > | pins_solenoid, | +
+ | + | uint8_t | pwmRes ) | +
Constructor.
+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.
+ +void SingleHumidistat::update | +( | +) | ++ |
Definition at line 11 of file SingleHumidistat.cpp.
+void SingleHumidistat::updatePIDParameters | +( | +) | ++ |
Definition at line 19 of file SingleHumidistat.cpp.
+
+
|
+ +private | +
Definition at line 15 of file SingleHumidistat.h.
+ +
+
|
+ +private | +
Definition at line 16 of file SingleHumidistat.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This is the complete list of members for ThermistorReader, including all inherited members.
+B | ThermistorReader | private |
getThermistorResistance() const | ThermistorReader | private |
pin | ThermistorReader | private |
r_inf | ThermistorReader | private |
R_series | ThermistorReader | private |
readTemp() const | ThermistorReader | |
ref_pin | ThermistorReader | private |
ThermistorReader(uint8_t pin) | ThermistorReader | explicit |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Driver for thermistor thermometers. + More...
+ +#include <ThermistorReader.h>
+Public Member Functions | |
ThermistorReader (uint8_t pin) | |
Constructor. | |
double | readTemp () const |
Get the temperature of the thermistor. | |
+Private Member Functions | |
double | getThermistorResistance () const |
Calculate the resistance of the thermistor in the voltage divider. | |
+Private Attributes | |
const uint8_t | ref_pin = 5 |
Reference (high) voltage pin number. | |
const uint8_t | pin |
NTC pin number. | |
const double | R_series = 10000 |
Resistance of R2 in voltage divider (Ohm) | |
const double | B = 3950 |
Thermistor's value of B in the thermistor equation (K) | |
const double | r_inf = 0.01752 |
Thermistor's value of R_inf in the thermistor equation (Ohm) | |
Driver for thermistor thermometers.
+ +Definition at line 7 of file ThermistorReader.h.
+
+
|
+ +explicit | +
Constructor.
+pin | NTC pin number |
Definition at line 4 of file ThermistorReader.cpp.
+ +
+
|
+ +private | +
Calculate the resistance of the thermistor in the voltage divider.
+Definition at line 6 of file ThermistorReader.cpp.
+double ThermistorReader::readTemp | +( | +) | +const | +
Get the temperature of the thermistor.
+Definition at line 12 of file ThermistorReader.cpp.
+
+
|
+ +private | +
Thermistor's value of B in the thermistor equation (K)
+ +Definition at line 12 of file ThermistorReader.h.
+ +
+
|
+ +private | +
NTC pin number.
+ +Definition at line 10 of file ThermistorReader.h.
+ +
+
|
+ +private | +
Thermistor's value of R_inf in the thermistor equation (Ohm)
+ +Definition at line 13 of file ThermistorReader.h.
+ +
+
|
+ +private | +
Resistance of R2 in voltage divider (Ohm)
+ +Definition at line 11 of file ThermistorReader.h.
+ +
+
|
+ +private | +
Reference (high) voltage pin number.
+ +Definition at line 9 of file ThermistorReader.h.
+ +
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Namespaces | |
namespace | config |
Define either HUMIDISTAT_CONTROLLER_SINGLE or HUMIDISTAT_CONTROLLER_CASCADE. In the latter case, flow sensors must be connected to PIN_F1 and PIN_F2. | |
+Variables | |
const uint32_t | config::serialRate = 115200 |
Serial communication symbol rate (baud) | |
const bool | config::overrideEEPROM = false |
Set to true to override the values stored in EEPROM and use the default PID parameters defined below. | |
const uint8_t | config::EEPROMAddress = 0 |
EEPROM address for storing the block. | |
const uint16_t | config::dt = 500 |
Global interval for PID/logger (based on polling rate of sensor, in millis) | |
const double | config::S_lowValue = 0.75 |
Minimum solenoid duty cycle (deadband) | |
const double | config::HC_totalFlowrate = 2 |
Total flowrate (for cascade controller) (L/min) | |
const double | config::a = 0.75 |
Smoothing factor of EMA filter for derivative. | |
Humidity controller PID parameters | |
const double | config::HC_Kp = 0.01 |
const double | config::HC_Ki = 0.001 |
const double | config::HC_Kd = 0.01 |
const double | config::HC_Kf = 0.01 |
Flow controller PID parameters | |
const double | config::FC_Kp = 0.005 |
const double | config::FC_Ki = 0.05 |
const double | config::FC_Kd = 0 |
const double | config::FC_Kf = 0 |
const uint16_t | config::FC_dt = 100 |
Setpoint profiles | |
const uint8_t | config::interval = 20 |
const Point | config::profile_tuningtest [] |
const SPProfile | config::profiles [] |
Setpoint profile definitions. | |
UI | |
const uint16_t | config::buttonDebounceInterval = 500 |
For debouncing: interval the keypad state must be stable for (in micros) | |
const uint16_t | config::inputInterval = 200 |
Repeat interval for keypress events (in millis) | |
const uint16_t | config::blinkInterval = 500 |
Interval for blinking display elements (in millis) | |
const uint16_t | config::splashDuration = 2000 |
Duration for which to show the splash screen (in millis) | |
const uint16_t | config::infoDuration = 0 |
Duration for which to show the info screen (in millis) | |
const uint16_t | config::refreshInterval = 100 |
Interval for updating the display (in millis) | |
const uint8_t | config::adjustStep = 10 |
Step size by which to in-/de-crement for coarse adjustment. | |
const double | config::tolerance = 0.01 |
Tolerance in difference between process variable and setpoint outside which the setpoint blinks (in percentage points) | |
For GraphicalDisplayUI: | |
const uint16_t | config::longPressDuration = 500 |
Duration for counting a press as 'long' (in millis) | |
const uint8_t | config::configSaveCooldown = 20 * 1000 / refreshInterval |
Cooldown on saving the config to EEPROM (in refresh cycles) | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
File in src/control | Includes file in src/sensor |
---|---|
CascadeHumidistat.h | FlowSensor.h |
FlowController.h | FlowSensor.h |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
File in src | Includes file in src/input |
---|---|
main.cpp | ButtonReader.h |
ui / ControllerUI.h | ButtonReader.h |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
File in src | Includes file in src/sensor |
---|---|
control / CascadeHumidistat.h | FlowSensor.h |
control / FlowController.h | FlowSensor.h |
main.cpp | ThermistorReader.h |
SerialLogger.h | ThermistorReader.h |
ui / ControllerUI.h | ThermistorReader.h |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
File in src/ui | Includes file in src/control |
---|---|
CharDisplayUI.h | SingleHumidistat.h |
GraphicalDisplayUI.h | CascadeHumidistat.h |
GraphicalDisplayUI.h | SingleHumidistat.h |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
File in src/ui | Includes file in src/input |
---|---|
ControllerUI.h | ButtonReader.h |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
File in src/ui | Includes file in src/sensor |
---|---|
ControllerUI.h | ThermistorReader.h |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+Directories | |
control | |
input | |
sensor | |
ui | |
+Files | |
advanceEnum.h | |
aliases.h | |
asprintf.h | |
config.h | |
config_assert.h | |
EEPROMConfig.cpp | |
EEPROMConfig.h | |
imath.h | |
main.cpp | |
new.cpp | |
Point.h | |
SerialLogger.h | |
SetpointProfileRunner.cpp | |
SetpointProfileRunner.h | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+Files | |
DHTHumiditySensor.cpp | |
DHTHumiditySensor.h | |
FlowSensor.cpp | |
FlowSensor.h | |
SHTHumiditySensor.cpp | |
SHTHumiditySensor.h | |
ThermistorReader.cpp | |
ThermistorReader.h | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+Files | |
CascadeHumidistat.cpp | |
CascadeHumidistat.h | |
Controller.cpp | |
Controller.h | |
FlowController.cpp | |
FlowController.h | |
Humidistat.cpp | |
Humidistat.h | |
PID.cpp | |
PID.h | |
SingleHumidistat.cpp | |
SingleHumidistat.h | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+Files | |
ButtonReader.cpp | |
ButtonReader.h | |
Buttons.h | |
Ks0256VoltLadder.cpp | |
Ks0256VoltLadder.h | |
Ks0466VoltLadder.cpp | |
Ks0466VoltLadder.h | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+Files | |
CharDisplayUI.cpp | |
CharDisplayUI.h | |
ConfigPar.cpp | |
ConfigPar.h | |
ControllerUI.cpp | |
ControllerUI.h | |
GraphicalDisplayUI.h | |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
This page explains how to interpret the graphs that are generated by doxygen.
+Consider the following example:
This will result in the following graph:
+The boxes in the above graph have the following meaning:
+The arrows have the following meaning:
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
CButtonReader | Read button state from a voltage ladder-style keypad |
CConfigPar | A class for storing references to variables of various types (uint8_t, uint16_t, or double) |
CConfigStore | Config store containing variables, which can be stored in EEPROM |
▼CController | Base class for a controller. Owns a PID instance, and holds a reference to a ConfigStore instance |
CFlowController | Controls flow. Holds a reference to a FlowSensor instance |
▼CHumidistat | Base class for a humidistat. Holds a reference to a HumiditySensor instance |
CCascadeHumidistat | Control humidity using cascade PID: outer PID loop sets setpoints of two inner flow controllers, which drive a solenoid valve each. Adjust the public setpoint variable and call update() |
CSingleHumidistat | Control humidity using PID by driving two solenoid valves. Adjust the public setpoint variable and call update() |
▼CControllerUI | User interface (display and input) for humidistat. Hold references to ButtonReader for keypad input, and Humidistat for updating the humidity setpoint |
CCharDisplayUI | TUI for 16x2 character LCD. Holds a reference to a LiquidCrystal instance for writing to display. Displays current mode, PV, SP, and CV the first line of the display, and temperatures on the second line. Use keypad to adjust setpoint (UP/DOWN for fine, LEFT/RIGHT for coarse) |
CGraphicalDisplayUI< Humidistat_t > | TUI for 128*64 px graphical display using U8g2. Holds references to a U8g2lib instance for writing to display, an EEPROMConfig instance to edit the config, and to a Humidistat instance to show/edit its state |
CDHTHumiditySensor | Implementation of the HumiditySensor interface for the DHT22/AM2302 sensor |
CEEPROMConfig | Load/save an (internal) ConfigStore in EEPROM |
CFlowSensor | Read flow rate using a Omron D6F-P0010 MEMS flow sensor |
CKs0256VoltLadder | Implementation of the VoltLadder interface for the Keyestudio Ks0256 keypad |
CKs0466VoltLadder | Implementation of the VoltLadder interface for the Keyestudio Ks0466 keypad |
CPID | PID controller in parallel form implemented in floating-point arithmetic. Features Derivative-on-Measurement, anti-windup through conditional integration, bumpless transfer, and feed-forward |
CPoint | Point: a vector of a time and setpoint value |
CSerialLogger< Humidistat_t > | Logs humidistat data over serial |
CSetpointProfileRunner | 'Runs' a setpoint profile |
CSHTHumiditySensor | Implementation of the HumiditySensor interface for the Sensirion SHT85 sensor |
CSPProfile | Setpoint profile: a label and a span over Points |
CThermistorReader | Driver for thermistor thermometers |
CConfigPar::Var |
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
Go to the source code of this file.
++Functions | |
template<typename T > | |
constexpr T | ipow (T base, unsigned int pow) |
Constexpr function for computing integer power. | |
constexpr unsigned int | ilog10 (int n) |
Constexpr integer base-10 logarithm. | |
+
|
+ +constexpr | +
+
|
+ +constexpr | +
Constexpr function for computing integer power.
+T | Base type |
base | Base |
pow | Exponent |
Definition at line 10 of file imath.h.
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+
+ Humidistat
+
+ Arduino firmware for a humidistat (humidity controller)
+ |
+