  	// cast floats to string
  	String st(t, 2);
  	String sh(h, 2);
- 	// publish data
- 	Particle.publish("TEMP", st);
- 	Particle.publish("HUMIDITY", sh);
 
  	//post to dweet
  	request.hostname = "dweet.io";
   request.port = 80;
   request.path = "/dweet/for/glp_photon_vth?temp=" + st + "&humidity=" + sh + "&time=" + Time.timeStr();
- 	Particle.publish("DEBUG",request.body);
+ 	Particle.publish("Sensor data", request.path);
   http.get(request, response, headers);
   //Particle.publish("DEBUG",response.status);
-  Particle.publish("DEBUG",response.body);
+  Particle.publish("DEBUG", response.body);
 
   // Done, switch off LED
   digitalWrite(led, LOW);


int led = D7;           // internal LED
int pushButton = D5;    // Push button is connected to D5

// Connect pin 1 (on the left) of the sensor to +5V
// Connect pin 2 of the sensor to whatever your DHTPIN is

 }

void loop() {
  int pushButtonState = digitalRead(pushButton);
  if(pushButtonState == LOW) {
    // button was pressed, readout
    Particle.publish("BUTTON", "Button pressed, reading data");
    readout();
    i = 0;
  }
  else {
    i++;
    // after 5 minutes force a readout
    if(i == 100) {
      readout();
    }
  }
  delay(100);
}
