#include "DHT.h"          
const int broche_mesure=12;          
DHT dht(broche_mesure, DHT22); 

void setup(){
  dht.begin();
  Serial.begin(74880);
}

void loop(){
  delay(2000); 
  float t = dht.readTemperature(); 
  float rh = dht.readHumidity(); 
  
  if (isnan(t) || isnan(rh)) {
    Serial.println("Erreur de communication!"); 
    return; 
  }else{                     
    Serial.print("Température: "); 
    Serial.print(t); 
    Serial.print(" *C  - "); 
    Serial.print("Humidité: "); 
    Serial.println(rh); 
  }
}

