#include "DHT.h"
DHT monDHT(2, DHT22);
void setup() {
Serial.begin(9600);
Serial.println("DHT22 test!");
monDHT.begin();
}
void loop() {
delay(2000);
float h = monDHT.readHumidity();
float t = monDHT.readTemperature();
Serial.print("Humidité: ");
Serial.print(h,1);
Serial.print(" % Temperature: ");
Serial.println(t,1);
}