stemma_soil_moisture_sensor

Crates.iostemma_soil_moisture_sensor
lib.rsstemma_soil_moisture_sensor
version
sourcesrc
created_at2023-03-13 22:27:47.827336
updated_at2024-12-01 18:31:08.809887
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
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
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 sensor = SoilSensor::new(i2c, delay).with_units(TemperatureUnit::Fahrenheit);
    // Full
    let reading = sensor.read()?;
    let temp = reading.temperature;
    let moist = reading.moisture;
    // Individual
    let temp = sensor.temperature()?;
    let moist = sensor.moisture()?;
}
Commit count: 17

cargo fmt