   thresholdLow = env_min + (env_max - env_min) / 20.0f;
   thresholdHigh = env_min + (env_max - env_min) / 2.0f;
 
+  /*
+   * Check state
+   */
   int new_state = FAN_NOCHANGE;
   if (humidity < thresholdLow) {
     new_state = FAN_OFF;

//#include <Time.h>
#include <DHT22.h>

#define DHT22_PIN 6

      break;
  }

  /*
   * Output for debugging/graphing
   */

  // print out the values for debugging/plotting
  Serial.print("humidity = ");
  Serial.print(humidity, 1);
