#include <DHT.h>
#define DHTPIN 8
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
float h;
float t;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
dht.begin();
}
void loop() {
// put your main code here, to run repeatedly:
delay(2000);
h = dht.readHumidity();
t = dht.readTemperature();
Serial.print("Humidity: ");
Serial.print(h);
Serial.print("%, Temperature: ");
Serial.print(t);
Serial.println(" Celsius");
delay(10000);
}