  * v2.1 - 07-05-2017: dropped LED, minor changes
  * v2.2 - 08-05-2017: added daily max and min reports, use Time
  * v2.3 - 06-06-2017: minor refactoring, added heat index, reduced logs
- *************************************************************************/
+ * v2.4 - 09-06-2017: rough calibration for humidity, better WiFi handling
+ ******************************************************************************/
 
 // This #include statement was automatically added by the Particle IDE.
 #include "HttpClient/HttpClient.h"

  if(getAndStoreValues()) {
    // failed to read out, try again right away
    lastReadoutTime = 0;
    return;
  }
  // cast floats to strings
  String st(temp, 1);

  request.port = 80;
  request.path = "/dweet/for/" + thingName + "?" + payload;
  // make sure WiFi is ready
  int i = 0;
  while(!WiFi.ready()) {
    delay(300);
    if(++i == 100) {
      // the WiFi did not connect for 30 seconds, give up
      return -1;
    }
  }
  if(button) {
    Particle.publish("Button triggered readout", payload);
