   return counter == numAllowedViolations;
 }
 
-void publishViolationEvent(int numViolations, char* eventName) {
+void publishTempEvent(char* eventName, double fahrenheitTemp) {
   sprintf(publishString,"%.2f", fahrenheitTemp);
   Particle.publish(eventName, publishString);
 }


    if(inViolationForExactDuration(lowThreshExceededCounter, numLowTempViolations)) {
      Serial.println(" lowTempViolation");
      publishViolationEvent(numLowTempViolations, "lowTempViolation");
      lowThreshExceededCounter = 0; // now reset notification sequence
    }
  }
  else {
    lowThreshExceededCounter = 0;
  }
}

float getCelsiusTemp() {
  return celsiusTemp;
}

void loop(void) {

  fahrenheitTemp = calcFahrenheitFromCelsius(getCelsiusTemp());
  checkFreezerScreamerConditions();

  if(++loopCounter >= numLoopIterationsBeforeLog) {
    publishTempEvent("fahrenheitTempLog", fahrenheitTemp);
    loopCounter = 0;
  }

  delay(msAdditionalDelayInterval);
}
