#include <DHT.h>
int dhtpin = 2;
float temp;
float hum;
DHT body(dhtpin, DHT22);
void setup() {
// put your setup code here, to run once:
body.begin();
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
temp = body.readTemperature();
hum = body.readHumidity();
Serial.print("Temp :");
Serial.println(temp);
Serial.print("Hum :");
Serial.println(hum);
delay(1000);
}