flux sdk  v01.05.00-3-gedf3296
Embedded C++ SDK
Loading...
Searching...
No Matches
flxDevSoilMoisture.cpp File Reference

Device object for the SparkFun Soil Moisture sensor. More...

#include "Arduino.h"
#include "flxDevSoilMoisture.h"

Variables

const uint8_t kCalibrationIterations = 5
 
const uint16_t kCachedValueDeltaTicks = 1000
 

Detailed Description

Device object for the SparkFun Soil Moisture sensor.

This file contains the implementation of the device object for the SparkFun Soil Moisture sensor. Note - this is a GPIO device, which depends on the Soil Moisture Sensor being connected to defined GPIO pins. The required pins are VCC - a digitally controlled pin (to set low and high to power the sensor during reading), and Sensor - which is an ANALOG pin to read the sensor value. These pins are settable via properties.

The class provides methods to initialize the sensor, read moisture values, and calibrate the sensor for dry and wet states. It also includes properties to enable the sensor, set the GPIO pins, and retrieve the moisture values.

Date
2025-03-05
Version
1.0
Note
This file is part of the SparkFun Electronics Flux SDK.

Variable Documentation

◆ kCachedValueDeltaTicks

const uint16_t kCachedValueDeltaTicks = 1000

◆ kCalibrationIterations

const uint8_t kCalibrationIterations = 5