simple-dht11 0.1.2

A simple library to get a reading from a DHT11 hooked up to a Raspberry Pi.
Documentation
  • Coverage
  • 0%
    0 out of 8 items documented0 out of 4 items with examples
  • Size
  • Source code size: 42.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 721.89 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • BButner/simple-dht11
    1 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • BButner

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!