17#include <sfeTk/sfeToolKit.h>
20#define SFE_SOIL_MOISTURE_DEFAULT_I2C_ADDRESS 0x28
23#define SFE_SOIL_MOISTURE_MAX_VALUE 1023
37 sfeTkError_t
begin(sfeTkIBus *theBus =
nullptr);
45 sfeTkError_t
LEDOn(
void);
Definition: sfeDevSoilMoisture.h:26
sfeDevSoilMoisture()
Definition: sfeDevSoilMoisture.h:30
float readMoistureRatio(void)
Reads the sensor value and returns the moisture ratio from the sensor (0 - 1.0)
Definition: sfeDevSoilMoisture.cpp:75
sfeTkIBus * _theBus
Definition: sfeDevSoilMoisture.h:66
sfeTkError_t LEDOn(void)
Turns on the on-board LED.
Definition: sfeDevSoilMoisture.cpp:50
uint16_t readMoistureValue(void)
Reads the moisture value from the sensor.
Definition: sfeDevSoilMoisture.cpp:61
sfeTkError_t changeSensorAddress(uint8_t newAddress)
Changes the I2C address of the sensor.
Definition: sfeDevSoilMoisture.cpp:91
float readMoisturePercentage(void)
Reads the sensor value and returns the moisture percentage from the sensor (0 - 100%)
Definition: sfeDevSoilMoisture.cpp:85
sfeTkError_t begin(sfeTkIBus *theBus=nullptr)
Start the driver/begin connecting/comms to the device.
Definition: sfeDevSoilMoisture.cpp:26
sfeTkError_t LEDOff(void)
Turns off the on-board LED.
Definition: sfeDevSoilMoisture.cpp:40