from machine import Pin
import dht    
import time

p14=Pin(14, Pin.IN)
d=dht.DHT11(p14)           

try:
  while True:
      d.measure()                 #Measurement of temperature and humidity
      t=d.temperature()       	   #Read Celsius temperature
      h=d.humidity()               #Read relative humidity
      print('Temperature=', t, 'C', 'Humidity=', h, '%')
      time.sleep(1)                #Delay of 1 second
except KeyboardInterrupt:
          pass


