## Library for retrieving readings from Adafruit STEMMA Soil Sensor.
The implementation is based on the Adafruit CircuitPython Seesaw library.
The library is tested and used on a Raspberry Pi 3 B+ board, running Raspbian but uses interfaces
from embedded_hal
for all operation so it should work in no_std
environments as well.
## Example
```rust pub fn main(intervalms: u64) { use stemmasoilsensor::SoilSensor; use linuxembeddedhal::Delay; use embeddedhal::blocking::delay::DelayMs;
let delay = Delay {};
let mut sensor = SoilSensor::init(delay).unwrap();
loop {
let temp = sensor.get_temp().unwrap();
let cap = sensor.get_capacitance().unwrap();
println!("The temperature is: {:.02}", temp);
println!("The capactiance is: {}", cap);
let mut delay = Delay {};
delay.delay_ms(2000u32);
}
} ```
There are minor differences between this implementation and the one for the Arduino board. The two major differences are:
If #1 is a problem I'll be positive to implement a read
method which allows the user of the
library to supply a buffer of the size they need. Leave an issue or a PR with the implementation
and I'll add it.
On #2, the short timings used in the C example continuously caused read errors when I tried it so I'm not sure lowering it is possible.