 int value = 0;
 unsigned long startTime;
 long timeHeld;
+
+//Temperature Sensor Config
+DHT dht(2, DHT22);
 
 //Static IP address configuration
 IPAddress staticIP(192, 168, 0, 67); //ESP static ip

#include <ESP8266WebServer.h>
#include <PubSubClient.h>
#include <EEPROM.h>

#define USER_BUTTON 16
#define AP_LED 0

      digitalWrite(LED_BUILTIN, HIGH);
      server.send(200, "application/json", "{\"Response\":\"LED Off\"}");
    });

    server.on("/temperature", [](){
      float temperature = dht.readTemperature();
      //server.send(200, "application/json", "{\"Response\":\"LED Off\"}");
//      Serial.print(F("%  Temperature: "));
//      Serial.print(temperature);
      server.send(200, "application/json", "{\"Response\":\"" + String(temperature) + "\"}");      
    });
    server.on("/humidity", [](){
      float humidity = dht.readHumidity();
      //server.send(200, "application/json", "{\"Response\":\"LED Off\"}");
//      Serial.print(F("%  Temperature: "));
//      Serial.print(temperature);
      server.send(200, "application/json", "{\"Response\":\"" + String(humidity) + "\"}");      
    });
  }
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
