#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

#412 in Embedded development

Download history 12/week @ 2024-07-23 8/week @ 2024-07-30 6/week @ 2024-09-10 3/week @ 2024-09-17 14/week @ 2024-09-24 33/week @ 2024-10-01 2/week @ 2024-10-08

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