#include<DHT.h>
#define DHTPIN 8
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE) ;
float hum, temp;
void setup(){
Serial.begin(9600);
dht.begin();
}
void loop(){
hum=dht.readHumidity();
temp=dht.readTemperature ();
Serial.print("temperature:");
Serial.println(temp);
Serial.print("humidity:");
Serial.println(hum);
delay(1000);
}