A pure generic I2C crate for the Adafruit STEMMA soil moisture sensor
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()?;
}