#include <sfeDevSoilMoisture.h>
◆ sfeDevSoilMoisture()
sfeDevSoilMoisture::sfeDevSoilMoisture |
( |
| ) |
|
|
inline |
◆ begin()
sfeTkError_t sfeDevSoilMoisture::begin |
( |
sfeTkIBus * |
theBus = nullptr | ) |
|
Start the driver/begin connecting/comms to the device.
- Parameters
-
theBus | A pointer to an I2C toolkit object |
- Returns
- kSTkErrOk if successful, otherwise an error code
◆ changeSensorAddress()
sfeTkError_t sfeDevSoilMoisture::changeSensorAddress |
( |
uint8_t |
newAddress | ) |
|
Changes the I2C address of the sensor.
- Parameters
-
newAddress | The new I2C address to assign to the sensor |
- Returns
- kSTkErrOk if successful, otherwise an error code
◆ LEDOff()
sfeTkError_t sfeDevSoilMoisture::LEDOff |
( |
void |
| ) |
|
Turns off the on-board LED.
- Returns
- kSTkErrOk if successful, otherwise an error code
◆ LEDOn()
sfeTkError_t sfeDevSoilMoisture::LEDOn |
( |
void |
| ) |
|
Turns on the on-board LED.
- Returns
- kSTkErrOk if successful, otherwise an error code
◆ readMoisturePercentage()
float sfeDevSoilMoisture::readMoisturePercentage |
( |
void |
| ) |
|
Reads the sensor value and returns the moisture percentage from the sensor (0 - 100%)
- Returns
- The moisture percentage
◆ readMoistureRatio()
float sfeDevSoilMoisture::readMoistureRatio |
( |
void |
| ) |
|
Reads the sensor value and returns the moisture ratio from the sensor (0 - 1.0)
- Returns
- The moisture ratio
◆ readMoistureValue()
uint16_t sfeDevSoilMoisture::readMoistureValue |
( |
void |
| ) |
|
Reads the moisture value from the sensor.
- Returns
- The moisture value - a resistance reading between 0 and 1023
◆ _theBus
sfeTkIBus* sfeDevSoilMoisture::_theBus |
|
protected |
The documentation for this class was generated from the following files: