2024-10-06 23:00:50 +05:30
# DHT Humidity Sensing on Raspberry Pi
2024-10-10 22:15:46 +05:30
This project is a uses the basic DHT11 python library (main method) and AdaFruit libraries (alternative method) for sensing temperature using DHT11 sensor and a Raspberry Pi.
2024-10-06 23:00:50 +05:30
---
2024-10-07 00:03:57 +05:30
2024-10-07 00:27:02 +05:30
> [!IMPORTANT]
> Check the [requirements](https://git.kska.io/notkshitij/DHT11/src/branch/main/REQUIREMENTS.md) first.
2024-10-07 00:20:19 +05:30
## Main method
2024-10-07 00:38:19 +05:30
> [!NOTE]
2024-10-10 22:15:46 +05:30
> Main method uses the `DHT11` python library for reading the sensor data.
> This is a pure Python library for reading DHT11 sensor on Raspberry Pi.
2024-10-07 00:20:19 +05:30
2024-10-10 22:15:46 +05:30
1. Install prerequisites:
2024-10-07 00:20:19 +05:30
```shell
sudo apt update & & \
2024-10-10 22:15:46 +05:30
sudo apt install -y git
2024-10-07 00:20:19 +05:30
```
2. Clone the project:
```shell
git clone https://git.kska.io/notkshitij/DHT11.git
```
> Alternatively, you can also [download the zip file](https://git.kska.io/notkshitij/DHT11/archive/main.zip)
3. Change the current working directory to the folder in which the project was cloned:
```shell
cd ./DHT11
```
2024-10-10 22:15:46 +05:30
4. Run the `setup.sh` script:
2024-10-07 00:20:19 +05:30
```shell
2024-10-10 22:15:46 +05:30
source setup.sh
2024-10-07 00:20:19 +05:30
```
> [!IMPORTANT]
> After running the code, and completing the execution, run `deactivate` in the terminal to exit the virtual environment.
---
2024-10-07 00:03:57 +05:30
## Alternative method
> [!NOTE]
2024-10-23 13:23:22 +05:30
> This is the alternative method, using **AdaFruit library**. This method has been tested on Raspberry Pi 3B. For easier setup, checkout [## Main method](https://git.kska.io/notkshitij/DHT11#main-method)
2024-10-07 00:03:57 +05:30
2024-10-10 22:15:46 +05:30
1. Install prerequisite packages:
2024-10-07 00:03:57 +05:30
```shell
sudo apt update & & \
2024-10-10 22:15:46 +05:30
sudo apt install git -y
2024-10-07 00:03:57 +05:30
```
2024-10-10 22:15:46 +05:30
2. Clone the project:
2024-10-07 00:03:57 +05:30
```shell
2024-10-10 22:15:46 +05:30
git clone https://git.kska.io/notkshitij/DHT11.git
```
> Alternatively, you can also [download the zip file](https://git.kska.io/notkshitij/DHT11/archive/main.zip)
2024-10-07 00:20:19 +05:30
2024-10-10 22:15:46 +05:30
3. Change the current working directory to the folder in which the project was cloned:
```shell
cd ./DHT11
2024-10-07 00:03:57 +05:30
```
2024-10-10 22:15:46 +05:30
4. Run the `ada-setup.sh` script:
```shell
source ada-setup.sh
```
2024-10-07 00:20:19 +05:30
> [!IMPORTANT]
> After running the code, and completing the execution, run `deactivate` in the terminal to exit the virtual environment.
2024-10-07 00:03:57 +05:30
---
2024-10-07 00:27:02 +05:30
### License
This project is licensed under the terms of the MIT license. Read the license [here ](https://git.kska.io/notkshitij/DHT11/src/branch/main/LICENSE.txt ).
---