SparkFun Soil Moisture Sensor  v1.0.1-2-g96f40cb
Library for the SparkFun Soil Moisture Sensor
Loading...
Searching...
No Matches
sfDevSoilMoisture.h File Reference

Header file for the soil moisture sensor class. More...

#include <stdint.h>
#include <sfTk/sfToolkit.h>
#include <sfTk/sfTkII2C.h>
#include <sfTk/sfTkISPI.h>
Include dependency graph for sfDevSoilMoisture.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sfDevSoilMoisture
 Class representing the soil moisture sensor. More...
 

Macros

#define SF_SOIL_MOISTURE_DEFAULT_I2C_ADDRESS   0x28
 Default I2C address for the soil moisture sensor. More...
 
#define SF_SOIL_MOISTURE_MAX_VALUE   1023
 Maximum value for the soil moisture sensor. More...
 

Detailed Description

Header file for the soil moisture sensor class.

This file contains the class definition for the soil moisture sensor, including methods for initialization, reading moisture values, controlling the on-board LED, and setting the I2C address.

Author
SparkFun Electronics
Date
2025

SPDX-License-Identifier: MIT

Macro Definition Documentation

◆ SF_SOIL_MOISTURE_DEFAULT_I2C_ADDRESS

#define SF_SOIL_MOISTURE_DEFAULT_I2C_ADDRESS   0x28

Default I2C address for the soil moisture sensor.

This macro defines the default I2C address (0x28) used by the soil moisture sensor.

◆ SF_SOIL_MOISTURE_MAX_VALUE

#define SF_SOIL_MOISTURE_MAX_VALUE   1023

Maximum value for the soil moisture sensor.

This macro defines the maximum value (1023) for the soil moisture sensor, which corresponds to the highest reading from the 10-bit ADC. 2^10 = 1024-1