234bf7eedd4905a896ff42f3f307c36088aaf211
DHT Humidity Sensing on Raspberry Pi
This project is a uses the AdaFruit libraries for sensing temperature using DHT11 sensor and a Raspberry Pi.
Main method
[!NOTE] This is the main method, using AdaFruit library. For an easier method, checkout ## Alternative method
- Install some prerequisite packages:
sudo apt update &&\
sudo apt install git
- Clone the project:
git clone https://git.kska.io/notkshitij/DHT11.git
Alternatively, you can also download the zip file
- Change the current working directory to the folder in which the project was cloned:
cd ./DHT11
- Run the
setup.shscript:
./setup.sh
Important
After running the code, and completing the execution, run
deactivatein the terminal to exit the virtual environment.
Alternative method
Note
This alternative method uses the
DHT11python library for reading the sensor data. This is a pure Python library for reading DHT11 sensor on Raspberry Pi.
- Install prerequisites:
sudo apt update &&\
sudo apt upgrade -y &&\
sudo apt install python3 python3-pip -y
- Setup a virtual environment & install the library:
mkdir /home/$(whoami)/temp-sensor
cd /home/$(whoami)/temp-sensor
python3 -m venv .
source bin/activate
pip install dht11 setuptools RPi.GPIO
- Download and run the code alt-temp.py
Important
After running the code, and completing the execution, run
deactivatein the terminal to exit the virtual environment.
Description
Temperature and humidity sensing using DHT11 and Raspberry Pi (2/3/4/5). This project contains a setup.sh script to automate the python environment setup process entirely, along with two methods to interface with DHT11.
Readme
94 KiB
Releases
3
Release 2.1 for DHT11
Latest
Languages
Python
53.3%
Shell
46.7%