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.
Go to file
2024-10-07 01:01:39 +05:30
.gitignore Added .gitignore file 2024-10-06 23:03:48 +05:30
alt-temp.py Added execution permissions to .py files. 2024-10-07 00:50:24 +05:30
DHT11_Python (source code).tar.xz Added source code python library: DHT11 2024-10-06 23:59:04 +05:30
GUIDES.md Added link for main doc in guides file 2024-10-07 00:38:56 +05:30
LICENSE.md Added license file. 2024-10-07 00:23:23 +05:30
raspi-blinka.py Added execution permissions to .py files. 2024-10-07 00:50:24 +05:30
README.md Added auto yes in apt install git 2024-10-07 00:45:06 +05:30
REQUIREMENTS.md Added requirements file. 2024-10-07 00:24:15 +05:30
setup.sh Running raspi-blinka.py as sudo 2024-10-07 01:01:39 +05:30
temp-calc.py Added execution permissions to .py files. 2024-10-07 00:50:24 +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.


Important

Check the requirements first.

Main method

Note

This is the main method, using AdaFruit library. For an easier method, checkout ## Alternative method

  1. Install some prerequisite packages:
sudo apt update &&\
sudo apt install git -y

  1. Clone the project:
git clone https://git.kska.io/notkshitij/DHT11.git

Alternatively, you can also download the zip file

  1. Change the current working directory to the folder in which the project was cloned:
cd ./DHT11
  1. Run the setup.sh script:
./setup.sh

Important

After running the code, and completing the execution, run deactivate in the terminal to exit the virtual environment.


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:
sudo apt update &&\
sudo apt upgrade -y &&\
sudo apt install python3 python3-pip -y

  1. 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

  1. Download and run the code alt-temp.py

Important

After running the code, and completing the execution, run deactivate in the terminal to exit the virtual environment.


License

This project is licensed under the terms of the MIT license. Read the license here.