       tempSumm[period][sensor] = sensors.getTempC(thermalSensor[sensor]);
     }
   }
+  // initial value setting
+  for (int i; i < 3; i++)
+  {
+    startOfPeriod[i] = now ();
+    measuresPerPeriod[i] = monPeriodLen[i] / (cycleDelay / 1000);
+    tempAvgPrev[0][i] = sensors.getTempC(thermalSensor[i]);
+  }
+
 }
 // get sim900 module status
 boolean getSIM900status(boolean debug)

  for (int i = 0; i < sizeof(thermalSensor) / sizeof(DeviceAddress); i++)
  {
    Serial.println(getData(thermalSensor[i]));
    Serial.print("TREND "); Serial.print(i); Serial.print(":"); Serial.println(tempTrend[0][i]);
    makeForecast(i, true);
  }


int makeForecast(int sensor, bool debug)
{
  float forecastSeconds ;
  float delta_temp;
  float cur_temp = sensors.getTempC(thermalSensor[sensor]);

