#include <DHT.h>
int DhtPin=11;
DHT dht(DhtPin,DHT22);
void setup() {
// put your setup code here, to run once:
dht.begin();
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
float temp=dht.readTemperature();
float humd=dht.readHumidity();
Serial.print("Temperature of this room:");
Serial.print(temp);
Serial.println("deg.Celcius");
Serial.print("humidity of this room:");
Serial.print(humd);
delay(2000);
}