12 static const float PROBE_MV_TO_PH = 59.2;
13 static const float PROBE_TMP_CORRECTION = 0.03;
15 static const uint8_t CONFIG_TEMP_COMPENSATION = 0x02;
17 static const uint8_t REGISTER_VERSION = 0;
18 static const uint8_t REGISTER_MV = 1;
19 static const uint8_t REGISTER_TEMP = 5;
20 static const uint8_t REGISTER_REFHIGH = 13;
21 static const uint8_t REGISTER_REFLOW = 17;
22 static const uint8_t REGISTER_READHIGH = 21;
23 static const uint8_t REGISTER_READLOW = 25;
24 static const uint8_t REGISTER_SOLUTION = 29;
25 static const uint8_t REGISTER_CONFIG = 38;
26 static const uint8_t REGISTER_TASK = 39;
28 static const uint8_t COMMAND_CALIBRATE_HIGH = 8;
29 static const uint8_t COMMAND_CALIBRATE_LOW = 10;
30 static const uint8_t COMMAND_MEASURE_TEMP = 40;
31 static const uint8_t COMMAND_MEASURE_MV = 80;
35 void setup()
override;
67 void play(Ts...
x)
override { this->parent_->calibrate_probe_low(this->solution_.value(
x...)); }
78 void play(Ts...
x)
override { this->parent_->calibrate_probe_high(this->solution_.value(
x...)); }
88 void play(Ts...
x)
override { this->parent_->reset_board(); }
UFireISECalibrateProbeLowAction(UFireISEComponent *parent)
void write_data_(uint8_t reg, float data)
UFireISEComponent * parent_
TEMPLATABLE_VALUE(float, solution) void play(Ts... x) override
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
UFireISEComponent * parent_
void play(Ts... x) override
This class simplifies creating components that periodically check a state.
UFireISECalibrateProbeHighAction(UFireISEComponent *parent)
sensor::Sensor * temperature_sensor_external_
float measure_temperature_()
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
void dump_config() override
void set_ph_sensor(sensor::Sensor *ph_sensor)
void calibrate_probe_high(float solution)
sensor::Sensor * ph_sensor_
TEMPLATABLE_VALUE(float, solution) void play(Ts... x) override
float read_data_(uint8_t reg)
void calibrate_probe_low(float solution)
float measure_ph_(float temperature)
sensor::Sensor * temperature_sensor_
Implementation of SPI Controller mode.
UFireISEResetAction(UFireISEComponent *parent)
void set_solution_(float solution)
Base-class for all sensors.
void set_temperature_sensor_external(sensor::Sensor *temperature_sensor)
This Class provides the methods to read/write bytes from/to an i2c device.
UFireISEComponent * parent_