/////////////////////////////////////// *** ventillation *** ///////////////////////////////////////
// **************************************** ventilation bac
if (tempbac >= tempbacmax){
  analogWrite(ventilateurbac, HIGH);
  }
else {
  digitalWrite(ventilateurbac, LOW);
  }
// **************************************** ventilation rampe
if (temprampe >= temprampemax){
    digitalWrite(ventilateurrampe, HIGH);
    if (img1==false){
    drawBMP("venti2.bmp", 65, 185, BU_BMP);
    img1 = !img1;
    }
// **************************************** envoie sms alerte
  if  (sms2==false){
        sms2 = !sms2;
        sms = "!!! ALERTE TEMPERATURE RAMPE !!!";
        sms += "Rampe : ";
        sms += (temprampe);
        sms += "t";
        #include "gsm.h"
        }
    } 


else {
  digitalWrite(ventilateurrampe, LOW);
  if (img1==true){
    img1 = !img1;
    tft.fillRect(65, 185, 50, 50, TFT_BLACK);  
    }
  if (sms2==true){
        sms2 = !sms2;
        sms = "!!! TEMPERATURE RAMPE OK !!!";
        sms += "Rampe : ";
        sms += (temprampe);
        sms += "t";
        #include "gsm.h"
    }
  }

/////////////////////////////////////// *** alarme / coupure chauffage / envoie sms *** ///////////////////////////////////////
// **************************************** buzzer
if (tempbac >= tempbacmax){
  if (S < 2){
    tone(buzzer, frequencebuzzer, dureebuzzer);
    delay (100);
    tone(buzzer, (frequencebuzzer + 200), dureebuzzer);
    delay (100);
    }
// ****************************************coupure chauffage
  analogWrite(chauffage, HIGH);
if  (sms1==false){
      sms1 = !sms1;
sms = "!!! ALERTE TEMPERATURE BAC !!!";
        sms += "Aquarium : ";
        sms += (tempbac);
        sms += "t";
        #include "gsm.h"
}
  if (((H > 8 ) && (H <= 23)) &&(M == 00)&& (S<5)){
    sms = "!!! ALERTE TEMPERATURE BAC !!!";
        sms += "Aquarium : ";
        sms += (tempbac);
        sms += "t";
        #include "gsm.h"
  } 
  }
  
else {
  digitalWrite(chauffage, LOW);
  if (sms1==true){
      sms1 = !sms1;
      sms = "!!! TEMPERATURE BAC OK !!!";
        sms += "Aquarium : ";
        sms += (tempbac);
        sms += "t";
        #include "gsm.h"
    }
  } 









