Loading...
Searching...
No Matches
Adafruit Seesaw Soil Moisture and Temperature Sensor

Driver for the Adafruit Seesaw Soil Moisture and Temperature Sensor. More...

Detailed Description

Driver for the Adafruit Seesaw Soil Moisture and Temperature Sensor.

This driver provides [S]ensor [A]ctuator [U]ber [L]ayer capabilities.

Modules

 Adafruit Seesaw Soil Moisture and Temperature Sensor driver compile configuration
 

Files

file  seesaw_soil.h
 Interface definition for the Adafruit Seesaw Soil sensor.
 
file  seesaw_soil_params.h
 Default configuration for Seesaw Soil devices.
 
file  seesaw_soil_regs.h
 Register definitions for Seesaw Soil devices.
 

Data Structures

struct  seesaw_soil_params_t
 Parameters needed for device initialization. More...
 
struct  seesaw_soil_t
 Device descriptor for Seesaw Soil sensors. More...
 

Enumerations

enum  { SEESAW_SOIL_OK = 0 , SEESAW_SOIL_NODEV = -1 , SEESAW_SOIL_NOBUS = -2 , SEESAW_SOIL_BUSERR = -3 }
 Seesaw Soil specific return values. More...
 

Functions

int seesaw_soil_init (seesaw_soil_t *dev, const seesaw_soil_params_t *params)
 Initialize the given Seesaw Soil device.
 
int seesaw_soil_temperature (const seesaw_soil_t *dev, int16_t *temp)
 Convenience function for reading temperature.
 
int seesaw_soil_moisture (const seesaw_soil_t *dev, uint16_t *moist)
 Convenience function for reading ca.
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Seesaw Soil specific return values.

Enumerator
SEESAW_SOIL_OK 

everything went as expected

SEESAW_SOIL_NODEV 

no SEESAW_SOIL device found on the bus

SEESAW_SOIL_NOBUS 

errors while initializing the I2C bus

SEESAW_SOIL_BUSERR 

error during I2C communication

Definition at line 57 of file seesaw_soil.h.

Function Documentation

◆ seesaw_soil_init()

int seesaw_soil_init ( seesaw_soil_t dev,
const seesaw_soil_params_t params 
)

Initialize the given Seesaw Soil device.

Parameters
[out]devdevice descriptor of sensor to initialize
[in]paramsconfiguration parameters
Returns
SEESAW_SOIL_OK on success
SEESAW_SOIL_NOBUS if initialization of I2C bus fails
SEESAW_SOIL_NODEV if no Seesaw Soil device found on bus

◆ seesaw_soil_moisture()

int seesaw_soil_moisture ( const seesaw_soil_t dev,
uint16_t *  moist 
)

Convenience function for reading ca.

Parameters
[in]devdevice descriptor of sensor
[out]moistmoisture using capacitive measurement. Value is ranging from 200 (very dry) to 2000 (very wet).
Returns
SEESAW_SOIL_OK on success
SEESAW_SOIL_BUSERR on I2C communication failures

◆ seesaw_soil_temperature()

int seesaw_soil_temperature ( const seesaw_soil_t dev,
int16_t *  temp 
)

Convenience function for reading temperature.

Parameters
[in]devdevice descriptor of sensor
[out]temptemperature [in 100 * degree centigrade]
Returns
SEESAW_SOIL_OK on success
SEESAW_SOIL_BUSERR on I2C communication failures