#soil #adafruit #moisture #stemma

stemma_soil_moisture_sensor

A pure generic I2C crate for the Adafruit STEMMA soil moisture sensor

3 unstable releases

0.2.0 Jun 25, 2024
0.1.1 Sep 28, 2023
0.1.0 Mar 13, 2023

#414 in Embedded development

Download history 18/week @ 2024-07-26 2/week @ 2024-08-02 7/week @ 2024-09-13 8/week @ 2024-09-20 36/week @ 2024-09-27 6/week @ 2024-10-04 1/week @ 2024-10-11

151 downloads per month

MIT license

7KB
110 lines

Adafruit STEMMA soil moisture sensor   Latest Version

A pure generic I2C crate for the Adafruit STEMMA soil moisture sensor

Usage

use stemma_soil_moisture_sensor::prelude::*;

fn main() -> Result<(), SoilMoistureSensorError> {
    // Setup your I2C and import relevant delay
    let i2c = ...;

    let moisture = SoilSensor::new(i2c, Delay).with_units(TemperatureUnit::Fahrenheit);
    let temp = moisture.temperature()?;
    let moist = moisture.moisture()?;
}

Dependencies

~1.5MB
~40K SLoC