simple-dht11

Crates.iosimple-dht11
lib.rssimple-dht11
version0.1.2
sourcesrc
created_at2022-11-21 22:27:27.498651
updated_at2022-11-28 17:49:25.87982
descriptionA simple library to get a reading from a DHT11 hooked up to a Raspberry Pi.
homepagehttps://github.com/bbutner/simple-dht11
repositoryhttps://github.com/bbutner/simple-dht11
max_upload_size
id720481
size41,998
Beau Butner (BButner)

documentation

README

Simple DHT11

The aim of this library is to create an incredibly quick and easy way for a user to hook up a DHT11 to a Raspberry Pi and get a reading from it.

Example

use simple_dht11::dht11::Dht11;

fn main() {
    let mut dht11 = Dht11::new(27); // Note this is BCM

    let response = dht11.get_reading();

    println!("Temperature: {}", response.temperature);
    println!("Humidity: {}", response.humidity);
}

Example output:

Temperature: 24.9
Humidity: 21

⚠️ If you are cross compiling, please see the note about this on the RPPal Repo!

Commit count: 6

cargo fmt