#include "Streaming.h"
#include <DHT.h>
#include <LiquidCrystal_I2C.h>
#define WOKWI

#ifdef WOKWI
#define lireTemperature() readTemperature()
#define lireHumidite()  readHumidity()
#else 
#define lireTemperatue()  getTemperature()
#deinfe lireHumidite()  getHumidity()
#define BROCHE_CAPTEUR 2
#endif


#define FRANCAIS 1
#define ANGLAIS 2

#define LANGUE FRANCAIS

#if (LANGUE == FRANCAIS)
#define MSG_DEBUT "Incroyable application température ;-)\n\n"
#define MSG_POUR_TEMPERATURE "Temperature = "
#define MSG_HUMIDITE  ", Humidité = "
#endif

#if (LANGUE == ANGLAIS)
#define MSG_DEBUT "Best temperature app ;-)\n\n"
#define MSG_POUR_TEMPERATURE "Temperature = "
#define MSG_HUMIDITE  ", Humidity = "
#endif

LiquidCrystal lcd(0x27, 16, 2);
DHT capteur(BROCHE_CAPTEUR, DHT22); 


void setup() {
  capteur.begin();
  lcd.begin(16,2);
  lcd.print("T:");
  lcd.setCursor(0,1);
  lcd.print("H:");
}

void loop() {

  #ifdef DEBUG
  lcd <<  capteur.lireTemperature();
  lcd <<  capteur.lireHumidite() << endl;
  delay(500);
  #endif 

}