12 static const uint8_t CONFIG_TEMP_COMPENSATION = 0x02;
14 static const uint8_t REGISTER_VERSION = 0;
15 static const uint8_t REGISTER_MS = 1;
16 static const uint8_t REGISTER_TEMP = 5;
17 static const uint8_t REGISTER_SOLUTION = 9;
18 static const uint8_t REGISTER_COEFFICENT = 13;
19 static const uint8_t REGISTER_CALIBRATE_OFFSET = 33;
20 static const uint8_t REGISTER_COMPENSATION = 45;
21 static const uint8_t REGISTER_CONFIG = 54;
22 static const uint8_t REGISTER_TASK = 55;
24 static const uint8_t COMMAND_CALIBRATE_PROBE = 20;
25 static const uint8_t COMMAND_MEASURE_TEMP = 40;
26 static const uint8_t COMMAND_MEASURE_EC = 80;
30 void setup()
override;
65 TEMPLATABLE_VALUE(
float, solution)
68 void play(Ts...
x)
override {
69 this->parent_->calibrate_probe(this->solution_.value(x...), this->temperature_.value(x...));
80 void play(Ts...
x)
override { this->parent_->reset_board(); }
sensor::Sensor * temperature_sensor_
void play(Ts... x) override
void calibrate_probe(float solution, float temperature)
void set_temperature_coefficient(float coefficient)
void write_data_(uint8_t reg, float data)
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
float temperature_coefficient_
void set_temperature_compensation(float compensation)
This class simplifies creating components that periodically check a state.
void set_temperature_(float temperature)
UFireECResetAction(UFireECComponent *parent)
UFireECCalibrateProbeAction(UFireECComponent *parent)
UFireECComponent * parent_
void set_solution_(float solution, float temperature)
sensor::Sensor * ec_sensor_
float measure_temperature_()
void set_ec_sensor(sensor::Sensor *ec_sensor)
float read_data_(uint8_t reg)
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
void set_coefficient_(float coefficient)
void set_compensation_(float temperature)
void set_temperature_sensor_external(sensor::Sensor *temperature_sensor)
sensor::Sensor * temperature_sensor_external_
Implementation of SPI Controller mode.
Base-class for all sensors.
void dump_config() override
UFireECComponent * parent_
This Class provides the methods to read/write bytes from/to an i2c device.
float temperature_compensation_