shtcx2 0.1.0

Platform agnostic Rust driver for the Sensirion SHTCx series temperature/humidity sensors.
Documentation

Rust SHTCx / SHTWx Driver

Crates.io Version Crates.io Downloads No Std

This is a platform agnostic Rust driver for the Sensirion SHTCx and SHTWx temperature / humidity sensor series, based on the embedded-hal traits. An async API backed by embedded-hal-async is available through the async feature under shtcx2::asynchronous.

Note shtcx2 is an unofficial fork of the original shtcx crate. It keeps the same MIT OR Apache-2.0 licensing and attribution while adding maintained documentation/CI updates and optional async support.

Installation

[dependencies]
shtcx2 = "0.1.0"

Tested with the following sensors:

The SHTW2 uses the same protocol and is expected to work out-of-the-box, but has not been tested by the maintainers.

Docs: https://docs.rs/shtcx2

The Device

The Sensirion SHTCx series offers low-power high-precision digital temperature and humidity sensors that communicate over the I²C bus.

The SHTWx series uses the same protocol, but in a wafer-level chip-scale package (WLCSP).

Examples

There are a few examples in the examples directory: The linux-<target> example queries the sensor a few times using linux-embedded-hal, while the monitor-<target> example implements a terminal based real-time graphical temperature/humidity monitoring tool.

gif

License

Licensed under either of

Contributing

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.