SparkFun Soil Moisture Sensor
v00.09.00-32-g3ccbaeb
Library for the SparkFun Soil Moisture Sensor
|
#include <SparkFun_Soil_Moisture_Sensor.h>
Public Member Functions | |
bool | begin (const uint8_t address=SFE_SOIL_MOISTURE_DEFAULT_I2C_ADDRESS, TwoWire &wirePort=Wire) |
Begins the Device. More... | |
bool | isConnected () |
Checks if the Device is connected. More... | |
Public Member Functions inherited from sfeDevSoilMoisture | |
sfeDevSoilMoisture () | |
sfeTkError_t | begin (sfeTkIBus *theBus=nullptr) |
Start the driver/begin connecting/comms to the device. More... | |
sfeTkError_t | LEDOff (void) |
Turns off the on-board LED. More... | |
sfeTkError_t | LEDOn (void) |
Turns on the on-board LED. More... | |
uint16_t | readMoistureValue (void) |
Reads the moisture value from the sensor. More... | |
float | readMoistureRatio (void) |
Reads the sensor value and returns the moisture ratio from the sensor (0 - 1.0) More... | |
float | readMoisturePercentage (void) |
Reads the sensor value and returns the moisture percentage from the sensor (0 - 100%) More... | |
sfeTkError_t | changeSensorAddress (uint8_t newAddress) |
Changes the I2C address of the sensor. More... | |
Additional Inherited Members | |
Protected Attributes inherited from sfeDevSoilMoisture | |
sfeTkIBus * | _theBus |
|
inline |
Begins the Device.
address | I2C device address to use for the sensor |
wirePort | Wire port to use for I2C communication |
|
inline |
Checks if the Device is connected.