DHT11/README.md

34 lines
786 B
Markdown
Raw Normal View History

2024-10-06 23:00:50 +05:30
# DHT Humidity Sensing on Raspberry Pi
This project is a uses the AdaFruit libraries for sensing temperature using DHT11 sensor and a Raspberry Pi.
---
## Alternative method
> [!NOTE]
> This alternative method uses the `DHT11` python library for reading the sensor data.
> This is a pure Python library for reading DHT11 sensor on Raspberry Pi.
1. Install prerequisites:
```shell
sudo apt update &&\
sudo apt upgrade -y &&\
sudo apt install python3 python3-pip -y
```
2. Setup a virtual environment & install the library:
```shell
mkdir /home/$(whoami)/temp-sensor
cd /home/$(whoami)/temp-sensor
python3 -m venv .
source bin/activate
pip install dht11 setuptools RPi.GPIO
```
3. Run the code [alt-temp.py](https://git.kska.io/notkshitij/DHT11/src/branch/main/alt-temp.py)
---