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

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

Include dependency graph for sfDevSoilMoisture.cpp:

Variables

const uint8_t kCommandLEDOff = 0x00
 Command to turn off the on-board LED. More...
 
const uint8_t kCommandLEDOn = 0x01
 Command to turn on the on-board LED. More...
 
const uint8_t kCommandChangeAddress = 0x03
 Command to change the I2C address of the sensor. More...
 
const uint8_t kCommandGetValue = 0x05
 Command to get the moisture value from the sensor. More...
 
const uint8_t kCommandNothingNew = 0x99
 Command indicating no new data is available. More...
 

Detailed Description

Implementation file for the soil moisture sensor class.

This file contains the implementation of the soil moisture sensor class, 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

Variable Documentation

◆ kCommandChangeAddress

const uint8_t kCommandChangeAddress = 0x03

Command to change the I2C address of the sensor.

◆ kCommandGetValue

const uint8_t kCommandGetValue = 0x05

Command to get the moisture value from the sensor.

◆ kCommandLEDOff

const uint8_t kCommandLEDOff = 0x00

Command to turn off the on-board LED.

◆ kCommandLEDOn

const uint8_t kCommandLEDOn = 0x01

Command to turn on the on-board LED.

◆ kCommandNothingNew

const uint8_t kCommandNothingNew = 0x99

Command indicating no new data is available.