   else {
     t++;
     // force a readout after the given time interval
-    if(t >= readoutTimeIntervalMin*5*60) {
+    if(t >= readoutTimeIntervalMin*60*5) {
       readout(false);
       t = 0;
     }

 *
 * Changelog:
 * v1.0 - 1-05-2017: initial revision from https://www.hackster.io/shaiss
 * v2.0 - 6-05-2017: added wifi sleep + readout button + refactorization
 *
 *************************************************************************/

// This #include statement was automatically added by the Particle IDE.

// This #include statement was automatically added by the Particle IDE.
#include "Adafruit_DHT/Adafruit_DHT.h"

int dhtPin = 2;                        // DHT sensor pin
int pushButtonPin = D5;                // Push button pin
int readoutTimeIntervalMin = 3;        // perform a readout every given minutes
String thingName = "glp_photon_vth";   // thing name for Dweeter

DHT dht(dhtPin, DHT22);
HttpClient http;
