 void publishAverage(float temp) {
   char publishString[20];
   
-  snprintf(publishString, 20,"%f", temp);
+  snprintf(publishString, 20,"%.4f", temp);
   Particle.publish("minute_average", publishString);
   Serial.print("Average: ");
   Serial.println(publishString);

  /* server.httpSuccess(); */
  server.httpSuccess("text/plain; version=0.0.4");
  if (type != WebServer::HEAD) {
    char s_temp[75];
    char s_average_temp[100];
    char s_power[40];
    char s_freemem[100];
    uint32_t freemem;

    freemem = System.freeMemory();

    snprintf(s_temp, 75,"# TYPE temp_degrees gauge\ntemp_degrees %.4f\n\n", temperature);
    snprintf(s_average_temp, 100, "# TYPE average_temp_degrees gauge\naverage_temp_degrees %.4f\n\n", minuteAverage);
    snprintf(s_power, 40, "# TYPE heater gauge\nheater %i\n\n", power);
    snprintf(s_freemem, 100, "# Type free_mem_bytes\nfree_mem_bytes %i\n\n", freemem);

    server << s_temp;
    server << s_average_temp;

void publishTemp(float temp) {
  char publishString[20];
  
  snprintf(publishString, 20,"%.4f", temp);
  Particle.publish("temperature", publishString);
  Serial.print("Temp: ");
  Serial.println(publishString);
