theCore C++ embedded framework
ecl::sensor::fc28_defs Namespace Reference

Typedefs

using moisture_type = int
 Type that represents a moisture. More...
 

Variables

static constexpr auto resolution = 8
 Moisture value resolution. More...
 
static constexpr moisture_type max_moisture = (1 << resolution) - 1
 Maximum value of soil moisture. More...
 
static constexpr moisture_type min_moisture = 0
 Minimum value of soild moisture. More...
 

Typedef Documentation

◆ moisture_type

Type that represents a moisture.

Higher and lower bound are defined by max_moisture and min_moisture . In between amount of water contained in soil is propotional to the value itself. Well, at least it is naively assumed. No calibration is provided with sensor.

Variable Documentation

◆ resolution

constexpr auto ecl::sensor::fc28_defs::resolution = 8
static

Moisture value resolution.

I.e. amount of bits dedicated for holding the moisture. See also max_moisture and min_moisture

◆ max_moisture

constexpr moisture_type ecl::sensor::fc28_defs::max_moisture = (1 << resolution) - 1
static

Maximum value of soil moisture.

Upper bound defined when sensor is fully immersed in water. I.e. sampled volume contains 100% water.

◆ min_moisture

constexpr moisture_type ecl::sensor::fc28_defs::min_moisture = 0
static

Minimum value of soild moisture.

Lower bound defined I.e. sampled volume contains 0% water.