Data Gator
Hardware and software documentation for the Data Gator project.
Loading...
Searching...
No Matches
VWCSensor.hpp
Go to the documentation of this file.
1
14#ifndef VWC_SENSOR_H
15#define VWC_SENSOR_H
16
17
23class VWCSensor {
24
25 public:
39
50 virtual double getVWC(SoilMedia media, double voltage);
51
57 virtual std::string getSensorType();
58
67 virtual std::string toJSON(double voltage);
68
69};
70
71#endif
Interface for converting a voltage measurement from an analog sensor into a double,...
Definition VWCSensor.hpp:23
virtual std::string toJSON(double voltage)
Convert data to JSON key value pairs.
virtual std::string getSensorType()
Return brand+sensor model string for topic.
virtual double getVWC(SoilMedia media, double voltage)
Convert raw data to volume water/volume soil percentage.
SoilMedia
Defines types of soil for which the volumetric water content calculation needs to be adjusted.
Definition VWCSensor.hpp:35
@ SOILLESS
Fake soil, potting soil for example.
Definition VWCSensor.hpp:37
@ MINERAL_SOIL
Mineral-based soil. Dirt!
Definition VWCSensor.hpp:36
int reset_count
number of resets retrieved for NVS
Definition scheduler.hpp:31