◆ getSensorType()
std::string Teros10::getSensorType |
( |
| ) |
|
|
virtual |
Return brand+sensor model string for topic.
- Returns
- The sensor type as a string identifier, not unique since most VWC sensors are wired with no unique identifier.
Reimplemented from VWCSensor.
◆ getVWC()
Convert raw data to volume water/volume soil percentage.
- Parameters
-
[in] | media | The type of soil the sensor is going to be used in. This is assumed to be natural dirt by default, but some sensors allow this value to be changed to provide better accuracy. |
[in] | voltage | The raw reading from the sensor. |
- Returns
- Soil volumetric water content as a double. Values outside of range [0.0, 1.0] indicate sensor error.
Reimplemented from VWCSensor.
◆ toJSON()
std::string Teros10::toJSON |
( |
double |
voltage | ) |
|
|
inlinevirtual |
Convert data to JSON key value pairs.
- Parameters
-
[in] | voltage | The analog voltage read from the sensor. |
- Returns
- a JSON object string with both the raw reading (voltage) and the converted value as a float with valid values on range [0, 1].
Reimplemented from VWCSensor.
The documentation for this class was generated from the following files: