from machine import Pin
import time as time
from dht import DHT22
dataPin=16
myPin=Pin(dataPin,Pin.OUT,Pin.PULL_DOWN)
sensor=DHT22(myPin)
print("Date senzsor: ")
while True:
sensor.measure()
tempC=sensor.temperature()
hum=sensor.humidity()
print("\r", "Temperatura= ", tempC,chr(176)+"C " " Umiditate= ", hum, "%")
time.sleep(1)