 time_t tDelayMin = measureInterval;
 
 // Sensor data
-int sensorTempData[] = {0,0,0,0,0}; // temp, humid, light, ph, phTwoDecPlaces
+int sensorTempData[] = {0,0,0}; // temp, humid, light
 
 void setup() {
   Wire.begin();       // conects I2C

{
  dhtSensor();
  lightSensor();
  phProbe();
}

//----- pH functions
void phProbe()
{
  //This is our I2C ADC interface section
  //We'll assign 2 BYTES variables to capture the LSB and MSB(or Hi Low in this case)
  byte adc_high;
  byte adc_low;

  Wire.requestFrom(ADDRESS, 2);        //requests 2 bytes
  if(Wire.available())
  {
  while(Wire.available() < 2);         //while two bytes to receive
  //Set em
  adc_high = Wire.read();
  adc_low = Wire.read();
  //now assemble them, remembering our byte maths a Union works well here as well
  adc_result = (adc_high * 256) + adc_low;
  //We have a our Raw pH reading fresh from the ADC now lets figure out what the pH is
  calcpH(adc_result);

  sensorTempData[3] = (int) pH;
  sensorTempData[4] = ((int) (pH*100) - sensorTempData[3]*100); // Calculate the two decimals
  }
}

void calibratepH7(int calnum)
{
  params.pH7Cal = calnum;
  calcpHSlope();
  //write these settings back to eeprom
  eeprom_write_block(&params, (void *)0, sizeof(params));
}
void calibratepH4(int calnum)
{
  params.pH4Cal = calnum;
  calcpHSlope();
  //write these settings back to eeprom
  eeprom_write_block(&params, (void *)0, sizeof(params));
}
void calcpHSlope ()
{
  //RefVoltage * our deltaRawpH / 12bit steps *mV in V / OP-Amp gain /pH step difference 7-4
  params.pHStep = ((((vRef*(float)(params.pH7Cal - params.pH4Cal))/4096)*1000)/opampGain)/3;
}
void calcpH(int raw)
{
  float miliVolts = (((float)raw/4096)*vRef)*1000;
  float temp = ((((vRef*(float)params.pH7Cal)/4096)*1000)- miliVolts)/opampGain;
  pH = 7-(temp/params.pHStep);
}
void reset_Params(void)
{
  //Restore to default set of parameters!
  params.WriteCheck = Write_Check;
  params.pH7Cal = 2048; //assume ideal probe and amp conditions 1/2 of 4096
  params.pH4Cal = 1286; //using ideal probe slope we end up this many 12bit units away on the 4 scale
  params.pHStep = 59.16;//ideal probe slope
  eeprom_write_block(&params, (void *)0, sizeof(params)); //write these settings back to eeprom
}
//----- End pH functions

void lightSensor()
{

  pinMode(FAN, OUTPUT);
  pinMode(BOARDLED, OUTPUT);
  digitalWrite(BOARDLED, LOW);
}

void loop() {
