Crates.io | sensirion-rht |
lib.rs | sensirion-rht |
version | 1.1.3 |
source | src |
created_at | 2024-01-30 14:27:00.866261 |
updated_at | 2024-01-30 14:27:00.866261 |
description | Driver for several temperature and humidity sensors from Sensirion |
homepage | |
repository | https://git.openlogisticsfoundation.org/silicon-economy/libraries/serum/sensirion-rht |
max_upload_size | |
id | 1120293 |
size | 35,564 |
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.
Sensor | Kind | Link |
---|---|---|
SHT3x | Humidity and Temperature | Sensirion SHT3x |
STS3x | Temperature | Sensirion STS3x |
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
);
}
Open Logistics Foundation License
Version 1.3, January 2023
See the LICENSE file in the top-level directory.
Fraunhofer IML Embedded Rust Group - embedded-rust@iml.fraunhofer.de