HTU21D

Rust library for communicating with the HTU21D temperature and humidity sensor via i2c.This libray is configured with a custom build command for cargo, the library automaitcally builds for the Linux ARMV7 architecture.

This build is VERY much in development, there is currently no support, no tests, no benchmarks. The library was quickly written to be able to test out the Mikro Elektronika Temp&Hum13 board. This board is a closed-source system, so no development kit was provided. The Mikro Elektronika Temp&Hum13 board however runs a HTU21D chip on its i2c bus. Thereby allowing simple i2c communication to the sensor, bypassing the Mikro Elektronika Temp&Hum13. This library also functions using the Mikro Elekronika Pi 3 Click Shield.

For more information regarding the HTU21D datasheet follow this link.

Building

The library is currently not available on crates.io but can be build from sources and installed.

sh $ rustc --crate-type=lib htu21d.rs $ ls lib* libhtu21d.rlib

The built library can then be imported in your own pojrect using:

## Example ```rust extern crate HTU21D; extern crate linuxembeddedhal as hal;

use HTU21D::HTU21D; use hal::I2cdev;

fn main () { let mut dev = I2cdev::new("/dev/i2c-1").unwrap(); let driver = HTU21D::new(dev); } ```