 }
 
 void checkButton(){
-  
+
   int current = digitalRead(button);
-  
+
   if (current == HIGH && temp != current){
-   
+
     if (val == HIGH){
       relayOff();
     }
-   
+
     if (val == LOW){
       relayOn();
     }
-   
+
     temp = current;
   }
-  
+
   if (current == LOW && temp != current){
     temp = current;
   }
 
 }
-


const char* ssid     = "your network ssid";
const char* password = "your password";
IPAddress ip(192, 168, 0, 71);    
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);

ESP8266WebServer server(80);

int relay = 10; 
int button = 11;
int val = 0;
int temp = 0;

  Serial.println(ssid);
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());

  server.on("/", handle_root);

  server.on("/off", [](){
    relayOff();
    webString = 'Off';
    server.send(200, "text/plain", webString);
  });

  server.on("/on", [](){
    relayOn();
    webString = 'On';
    server.send(200, "text/plain", webString);
  });

  server.begin();
  Serial.println("HTTP server started");
}

void loop(void)
{
  server.handleClient();
  checkButton();
}

void relayOn(){
  digitalWrite(relay, HIGH);
