stemma_soil_moisture_sensor

Crates.iostemma_soil_moisture_sensor
lib.rsstemma_soil_moisture_sensor
version0.2.0
sourcesrc
created_at2023-03-13 22:27:47.827336
updated_at2024-06-25 04:39:54.065587
descriptionA pure generic I2C crate for the Adafruit STEMMA soil moisture sensor
homepage
repositoryhttps://github.com/FloppyDisck/STEMMA_soil_moisture_sensor
max_upload_size
id809304
size8,583
Guy S Garcia (FloppyDisck)

documentation

README

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()?;
}
Commit count: 15

cargo fmt