     digitalWrite(led, 0);
 }
 
+void handleImat(){
+//    digitalWrite(LED01, LOW);
+    String message = "";
+    long locId = -1;
+    int led = LED01;
+
+    if (server.arg("location")== ""){     //Parameter not found
+    
+        message = "location Argument not found";
+    
+    } else {
+        locId = server.arg("location").toInt();
+        switch (locId) {
+            case 1:
+                message = "At location1";
+                led = LED01;
+                break;
+            case 2:
+                message = "At location2";
+                led = LED02;
+                break;
+            case 3:
+                message = "At location3";
+                led = LED03;
+                break;
+            default:
+                message = "location Argument = ";
+                message += server.arg("location");
+        }
+
+    }
+    digitalWrite(led, LOW);
+    server.send(200, "text/plain", message);     //Returns the HTTP response
+    
+    delay(1000);
+    digitalWrite(LED01, HIGH);
+}
+
 void setup(void){
-    pinMode(led, OUTPUT);
-    digitalWrite(led, 0);
+    pinMode(LED01, OUTPUT);
+    digitalWrite(LED01, HIGH);
     Serial.begin(115200);
     WiFi.begin(ssid, password);
     Serial.println("");

const int LED03 = D7;

void handleRoot() {
    digitalWrite(led, 1);
    server.send(200, "text/plain", "hello from esp8266!");
    digitalWrite(led, 0);
}

#include <ESP8266WiFi.h>            
#include <ESP8266WebServer.h>
#include "config.h"

ESP8266WebServer server(80);
