Raspberry pi with DHT11

The  DHT11  is a commonly used  Temperature and humidity sensor that  comes with a dedicated NTC to measure temperature and an 8-bit microco...

The DHT11 is a commonly used Temperature and humidity sensor that comes with a dedicated NTC to measure temperature and an 8-bit microcontroller to output the values of temperature and humidity as serial data.

 

DHT11 Pinout Configuration

No:

Pin Name

Description

For DHT11 Sensor

1

Vcc

Power supply 3.5V to 5.5V

2

Data

Outputs both Temperature and Humidity through serial Data

3

NC

No Connection and hence not used

4

Ground

Connected to the ground of the circuit

For DHT11 Sensor module

1

Vcc

Power supply 3.5V to 5.5V

2

Data

Outputs both Temperature and Humidity through serial Data

3

Ground

Connected to the ground of the circuit

DHT11 Specifications

  • Operating Voltage: 3.5V to 5.5V
  • Operating current: 0.3mA (measuring) 60uA (standby)
  • Output: Serial data
  • Temperature Range: 0°C to 50°C
  • Humidity Range: 20% to 90%
  • Resolution: Temperature and Humidity both are 16-bit
  • Accuracy: ±1°C and ±1
To be able to easily communicate with some sensors, CircuitPython has been developed .So, before installing the specific DHT-library, we have to do dome work:

Open a terminal window and write followinf commands:
sudo apt update
sudo pat full-upgrade
sudo apt install python3-pip
sudo pip3 install --upgrade setuptools
it will take 10 min in raspberry pi 3B
Then install and run a script developed by Adafruit:
sudo pip3 install --upgrade adafruit-python-shell
sudo python3 raspi-blinka.py
Install the CircuitPython-DHT Library
Open a terminal window and write following commands
pip3 install adafruit-circuitpython-dht
sudo apt-get install libgpiod2

To enable dht11.py script run automatic copy temperature.service file inside /etc/systemd/system of raspberry pi
Enjoy!!
Output will be on log file inside /var/log of raspberry pi 




All python code , service file and bash code are available on my github 
https://github.com/sushildurlov/DHT11-with-raspberry-pi

COMMENTS

Name

Accident Alert,1,AI,2,Array,1,Aurdino,1,C,2,Computer Graphics,9,Data Science,3,Dataset,1,Decoratot,1,Django,1,ESP32,1,Fixed point/iteration method,1,Greater or smaller,1,html,1,Image Processing,1,JAVA,1,Javascript,22,Machine Learning,1,Matlab,3,Numerical Method,13,OOP,1,Other,3,PHP,1,Point operation,1,Python,11,Raspberry pi,1,Recommendation System,1,Regression,1,Reservation System,1,Robotics,1,Simulation,2,sine wave,1,String Handling Function,1,Web scrap,1,Webpage,1,
ltr
item
COMPUTER PROGRAMMING: Raspberry pi with DHT11
Raspberry pi with DHT11
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn5R5Kc2GstBFgJvaADGgU9s0wfrzDKizxJmDFLECDSsDMY4DayTsUJrTwASVWliI9zqAu3ixAIfVfHwqz3Wi2netISKBPjQ02xaHi5T6ugdhD4jkMfnqEpqEPkmZT3ogNkzyyX0ZLpcB27ijOJhLqI9x90FwcA8C49zn9s9Un7q-BC87VS-71Mx6V/w640-h368/image_2022-07-22_165923991.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn5R5Kc2GstBFgJvaADGgU9s0wfrzDKizxJmDFLECDSsDMY4DayTsUJrTwASVWliI9zqAu3ixAIfVfHwqz3Wi2netISKBPjQ02xaHi5T6ugdhD4jkMfnqEpqEPkmZT3ogNkzyyX0ZLpcB27ijOJhLqI9x90FwcA8C49zn9s9Un7q-BC87VS-71Mx6V/s72-w640-c-h368/image_2022-07-22_165923991.png
COMPUTER PROGRAMMING
https://computerprogram4ru.blogspot.com/2022/07/raspberry-pi-with-dht11.html
https://computerprogram4ru.blogspot.com/
https://computerprogram4ru.blogspot.com/
https://computerprogram4ru.blogspot.com/2022/07/raspberry-pi-with-dht11.html
true
8672391763020279633
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy