#temperature-humidity #humidity #temperature #aht10 #embedded-hal-driver

no-std aht10-async

A platform agnostic driver to interface with the AHT10 temperature/humidity sensor

2 unstable releases

new 0.1.0 May 5, 2024
0.0.1 Nov 24, 2023

#604 in Embedded development

Download history 12/week @ 2024-02-17 3/week @ 2024-02-24 4/week @ 2024-03-09 3/week @ 2024-03-16 7/week @ 2024-03-30 1/week @ 2024-04-06 132/week @ 2024-05-04

132 downloads per month

AGPL-3.0-or-later

16KB
102 lines

AHT10

An embedded rust no_std driver for the AHT10 temperature and humidity sensor.

Usage

Include library as a dependency in your Cargo.toml:

[dependencies.aht10]
version = "<version>"

To use the sensor, call AHT10::new with an embedded-hal i2c device:

extern crate aht10;

// Start the sensor.
let mut dev = AHT10::new(i2c_dev, embedded_hal::Delay).unwrap();
// Read humidity and temperature.
let (h, t) = dev.read().unwrap();

Documentation

API documentation is generated on docs.rs.

License

Licensed under AGPL-3.0.


lib.rs:

A platform agnostic driver to interface with the AHT10 temperature and humidity sensor.

This driver was built using embedded-hal-async traits.

Unfortunately, the AHT10 datasheet is somewhat underspecified. There's a FIFO mode as well as command data bytes which are briefly mentioned, but I've found no documentation describing what they mean. Caveat emptor.

Dependencies

~180KB