Data Gator
Hardware and software documentation for the Data Gator project.
Loading...
Searching...
No Matches
Teros10 Class Reference
Inheritance diagram for Teros10:
Collaboration diagram for Teros10:

Public Member Functions

 Teros10 (int analog_pin, int pwr_pin)
 
float readVoltage ()
 
double getVWC (SoilMedia media)
 
double getVWC (SoilMedia media, double voltage)
 Convert raw data to volume water/volume soil percentage.
 
std::string toJSON (double voltage)
 Convert data to JSON key value pairs.
 
std::string getSensorType ()
 Return brand+sensor model string for topic.
 
double apparentDialectricPermitivity ()
 

Private Attributes

int analog_pin
 
int pwr_pin
 

Additional Inherited Members

- Public Types inherited from VWCSensor
enum  SoilMedia { MINERAL_SOIL , SOILLESS }
 Defines types of soil for which the volumetric water content calculation needs to be adjusted. More...
 

Member Function Documentation

◆ 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()

double Teros10::getVWC ( SoilMedia  media,
double  voltage 
)
virtual

Convert raw data to volume water/volume soil percentage.

Parameters
[in]mediaThe 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]voltageThe 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]voltageThe 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: