DHT11/README.md

2.1 KiB

DHT Humidity Sensing on Raspberry Pi

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.


Important

Check the requirements first.

Main method

Note

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.

  1. Install prerequisites:
sudo apt update &&\
sudo apt install -y git
  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:
source 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 is the alternative method, using AdaFruit library. This method doesnt' seem to work on our college Raspberry Pi 3's. For easiler setup, checkout ## Main method

  1. Install 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 ada-setup.sh script:
source ada-setup.sh

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.