      "\"event\": \"" + String(event) + "\" }", PRIVATE);
 }
 
-void ReadPressure(int i2c_address)      // function to read pressure/temp from pressure sensor
-{
-  Wire.beginTransmission(i2c_address);
-  Wire.requestFrom(i2c_address,4);       // request 4 bytes of data from sensor
-  while(Wire.available())
-  {
-    pdata[1] = Wire.read();
-    pdata[2] = Wire.read();
-    pdata[3] = Wire.read();
-    pdata[4] = Wire.read();
-  }
-  Pressure = ((pdata[1]) & 0x3F)<<8 | ((pdata[2]));   // combine 2 bytes of pressure data
-  Pressure = (Pressure - 1000)*(250/14000);           // calculate pressure in PSI
-  PTemp = ((pdata[3])<<3 | ((pdata[4]) & 0xE0)>>5);   // combine 2 bytes of temp data
-  PTemp = (PTemp * 200)/2048 - 50;                    // calculate temp in C
-  Wire.endTransmission();
-}
-
 void SwitchMux(int select)          // function to change the i2c mux channel
 {
   Wire.beginTransmission(MuxI2C);

  Wire.endTransmission();
}


int configInterval(String interval) // Particle function for data publishing interval
{
    if (interval == "10S")        // if function call = 10 seconds
    {
      DataInterval = TenSec;
      return 10;
    }
    else if (interval == "1M")    // if function call = 1 minute
    {
      DataInterval = OneMin;
      return 60;
    }
    else if (interval == "5M")    // if function call = 5 minutes
    {
      DataInterval = FiveMin;
      return 300;
    }
    else if (interval == "10M")   // if function call = 10 minutes
    {
      DataInterval = TenMin;
      return 600;
    }
    else if (interval == "15M")   // if function call = 10 minutes
    {
      DataInterval = FifteenMin;
      return 900;
    }
    else return -1;

    int addr = 10;              // define EEPROM data structure
    struct nvmobject
    {
      uint16_t verifyEE;

  // calculate amplitude by summing the squares, divide vectors by 100 to keep number manageable
      Adata[f] += (xdata[i]*xdata[i])/100 + (ydata[i]*ydata[i])/100 + (zdata[i]*zdata[i])/100;
    }
    Adata[f] = sqrt(Adata[f]);          // Amplitude = squareroot of sum of the squares
  }
}

