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
151 downloads per month
7KB
110 lines
Adafruit STEMMA soil moisture sensor
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