sensirion-rht

Crates.iosensirion-rht
lib.rssensirion-rht
version1.1.3
sourcesrc
created_at2024-01-30 14:27:00.866261
updated_at2024-01-30 14:27:00.866261
descriptionDriver for several temperature and humidity sensors from Sensirion
homepage
repositoryhttps://git.openlogisticsfoundation.org/silicon-economy/libraries/serum/sensirion-rht
max_upload_size
id1120293
size35,564
Fraunhofer IML Embedded Rust Group (embedded-rust-iml-user)

documentation

README

sensirion-rht

This crate implements multiple Temperature and Humidity Sensors from Sensirion. Multiple Sensors are combined into one single crate since the sensors share a common API.

Supported Sensors:

Sensor Kind Link
SHT3x Humidity and Temperature Sensirion SHT3x
STS3x Temperature Sensirion STS3x

Usage Example

The SHT3X returns both temperature and humidity

use sensirion_rht::*;
let mut sensor = Device::new_sht3x(Addr::A, i2c, delay);

if let Ok((temperature, humidity)) = sensor.single_shot(Repeatability::High) {
  log::info!(
    "Temperature: {}, Humidity: {}",
    temperature,
    humidity
  );
}

The STS3X returns only temperature

use sensirion_rht::*;
let mut sensor = Device::new_sts3x(Addr::A, i2c, delay);

if let Ok(temperature) = sensor.single_shot(Repeatability::High) {
  log::info!(
    "Temperature: {}",
    temperature
  );
}

License

Open Logistics Foundation License
Version 1.3, January 2023

See the LICENSE file in the top-level directory.

Contact

Fraunhofer IML Embedded Rust Group - embedded-rust@iml.fraunhofer.de

Commit count: 0

cargo fmt