Hey,
In today's blog we are going to know how to interface humidity sensor with raspberry pi.
WHAT YOU NEED :
Raspberry pi 3
Humidity sensor DHT11
Connecting wire
Power supply
Computer
CIRCUIT DIAGRAM:
import sys | |
import Adafruit_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(1) |
Making electronics project is too pretty simple with Us.
Join and Make with Us.
Comments