 #include "FiniteStateMachine.h"
 #define APP_NAME "Thermostat"
 
-String VERSION = "Version 0.09";
+String VERSION = "Version 0.10";
 /*******************************************************************************
  * changes in version 0.09:
        * reorganized code to group functions
        * added minimum time to protect on-off on the fan and the heating element
           in function heatingUpdateFunction()
+ * changes in version 0.10:
+       * added temperatureDifference to fix DHT measurements with existing thermostat
+       * reduced END_OF_CYCLE_TIMEOUT to one sec since the HVAC controller
+          takes care of waiting of evacuating the heat/cold from the vents
 *******************************************************************************/
 
 /*******************************************************************************

 currentHumidityString = String(currentHumidityChar);

 //publish readings
 Particle.publish(APP_NAME, "Current temperature: " + currentTempString, 60, PRIVATE);
 Particle.publish(APP_NAME, "Current humidity: " + currentHumidityString, 60, PRIVATE);

 return 0;


    return 0;
  }

  //sample acquired, adjust DHT difference if any
  float tmpTemperature = (float)DHT.getCelsius();
  tmpTemperature = tmpTemperature + temperatureDifference;

  //sample acquired - go ahead and store temperature and humidity in internal variables
  publishTemperature( tmpTemperature, (float)DHT.getHumidity() );

  //reset the sample flag so we can take another
  bDHTstarted = false;
