This is a platform agnostic Rust driver the SHT3x (SHT30, SHT31 and SHT35) digital
humidity and temperature sensors using the embedded-hal
traits.
The device
The sensors of the SHT3x family are humidity and temperature sensors, that are fully calibrated and working with wide range of supply voltages, from 2.15 V to 5.5 V, and using an I²C interface.
They procure fast start-up and measurement times, and great accuracy. The typical accuracies are the following:
SHT30 | SHT31 | SHT35 |
---|---|---|
±2 %RH / ±0.2 °C | ±2 %RH / ±0.2 °C | ±1.5 %RH / ±0.1 °C |
The SHT3x is equipped with an internal heater which can increase the temperature in the range of a few degrees centigrade, and that is useful for pausibility checks.
Documentation:
Features
- Get the status of the sensor.
- Clear the status of the sensor.
- Enable the internal heater.
- Disable the internal heater.
- Perform a single-shot measurement of temperature and relative humidity.
- Do a sofware set.
- Convert temperatures between °C and °F.
- Calculate the absolute humidity from a measurement.
- Perform periodic measurement of temperature and relative humidity.
- Include a no floating-point variant for systems without fpu.
Usage
To use this driver, import what you need from this crate and an embedded-hal
implentation, then instatiate the device.
use ;
use linux_embedded_hal as hal;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.