import sys import Adafruit_DHT #import Adafruit_Python_DHT import time while True: humidity,temperature = Adafruit_DHT.read_retry(11,4) print('Temp:{0:0.1f} C Humidity:{1:0.1f}%',format(temperature,humidity)) time.sleep(2)
DHT11 Interfacing with Raspberry Pi 3 and Python
March 25th, 2019 Nilesh Chaurasia