 //*********************VARIABLES GLOBALES*************
 //nombre d'items activés
 const int nbPrograms = 5;              //Nombre de programmes de température
-boolean rollups[1];
-boolean heaters[1];
-boolean fans[1];
-boolean fanSafety[sizeof(fans)];
-boolean rollupSafety[sizeof(rollups)];
+boolean rollups[NBROLLUPS] = {};
+boolean heaters[NBHEATERS] = {};
+boolean fans[NBFANS] = {};
+boolean fanSafety[NBFANS] = {};
+boolean rollupSafety[NBROLLUPS] = {};
 
 //Sonde de température
 boolean failedSensor = false;
 
 //Poisition des Rollups
-volatile byte incrementCounter[sizeof(rollups)];               //positionnement des rollups
-boolean firstOpening[sizeof(rollups)];
+volatile byte incrementCounter[NBROLLUPS] = {};               //positionnement des rollups
+boolean firstOpening[NBROLLUPS] = {};
 
 //Programmes horaire
-byte sunTime[6];                      //données de l'horloge
+byte sunTime[6] = {};                      //données de l'horloge
+byte sunRise[3] = {};
+byte sunSet[3] = {};
+byte P[nbPrograms][3] = {};
 byte program;                         //Programme en cour
 byte lastProgram;                    //Dernier programme en cour
 

          case 1:
            switchmenu(51); break;
          case 2:
            if (sizeof(nbPrograms) >= 2){switchmenu(52);}
            else{switchmenu(0);}
            break;
          case 3:
            if (sizeof(nbPrograms) >= 3){switchmenu(52);}
            else{switchmenu(0);}
            break;
          case 4:
            if (sizeof(nbPrograms) >= 4){switchmenu(52);}
            else{switchmenu(0);}
            break;
          case 5:
            if (sizeof(nbPrograms) >= 5){switchmenu(52);}
            else{switchmenu(0);}
            break;
          case 6: switchmenu(0); break;

}

void selectMenu(int x, int y) {

  int P[nbPrograms][3];

  switch (x) {
    //------------------------------SelectrootMenu-------------------------------------
    //"Temperature/humidex","Date/time","Rollups","Ventilation","Chauffage"
