 
     if(inViolationForExactDuration(highThreshExceededCounter, numHighTempViolations_level1)) {
       Serial.println(" highTempViolation_level1");
-      publishViolationEvent(numHighTempViolations_level1, "highTempViolation_level1");
+      publishTempEvent("highTempViolation_level1", fahrenheitTemp);
+      Particle.publish("fahrenheitTempLog", "highTempViolation_level1");
     }
     if(inViolationForExactDuration(highThreshExceededCounter, numHighTempViolations_level2)) {
       Serial.println(" highTempViolation_level2");
-      publishViolationEvent(numHighTempViolations_level2, "highTempViolation_level2");
+      publishTempEvent("highTempViolation_level2", fahrenheitTemp);
+      Particle.publish("fahrenheitTempLog", "highTempViolation_level2");
     }
     if(inViolationForExactDuration(highThreshExceededCounter, numHighTempViolations_level3)) {
       Serial.println(" highTempViolation_level3");
-      publishViolationEvent(numHighTempViolations_level3, "highTempViolation_level3");
+      publishTempEvent("highTempViolation_level3", fahrenheitTemp);
+      Particle.publish("fahrenheitTempLog", "highTempViolation_level3");
       highThreshExceededCounter = 0; // now reset notification sequence
     }
   }

int numHighTempViolations_level2 = msfiveMinutes/msTotalDelayInterval;
int numHighTempViolations_level3 = msOneHour/msTotalDelayInterval;

double fahrenheitTemp = 0.0;
float celsiusTemp;
char publishString[40];

void setup() {
  Serial.begin(9600);


    if(inViolationForExactDuration(lowThreshExceededCounter, numLowTempViolations)) {
      Serial.println(" lowTempViolation");
      publishTempEvent("lowTempViolation", fahrenheitTemp);
      Particle.publish("fahrenheitTempLog", "lowTempViolation");
      lowThreshExceededCounter = 0; // now reset notification sequence
    }
  }
  else {
    lowThreshExceededCounter = 0;
  }
}

void loop(void) {
