Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bbutner/simple-dht11
Rust library to get a data reading from a DHT11 Sensor, with a Raspberry Pi
https://github.com/bbutner/simple-dht11
dht11 raspberry-pi
Last synced: about 2 months ago
JSON representation
Rust library to get a data reading from a DHT11 Sensor, with a Raspberry Pi
- Host: GitHub
- URL: https://github.com/bbutner/simple-dht11
- Owner: BButner
- License: gpl-3.0
- Created: 2022-11-21T21:59:09.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-28T17:07:08.000Z (over 1 year ago)
- Last Synced: 2024-10-11T18:18:50.078Z (3 months ago)
- Topics: dht11, raspberry-pi
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```rust
use simple_dht11::dht11::Dht11;fn main() {
let mut dht11 = Dht11::new(27); // Note this is BCMlet 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!](https://github.com/golemparts/rppal#cross-compilation)