Controlling Multiple load using Simple esp01 in softAP

#include <Wire.h>
void setup() {
  Serial.begin(115200);
  Wire.begin(0, 2); // GPIO0 = SDA, GPIO2 = SCL
  Serial.println("Scanning I2C devices...");
}

void loop() {
  for (byte address = 1; address < 127; address++) {
    Wire.beginTransmission(address);
    if (Wire.endTransmission() == 0) {
      Serial.print("Device found at 0x");
      Serial.println(address, HEX);
    }
  }
  delay(10000);
}
#include <Wire.h>
#define PCF8574_ADDR 0x20  // Default I2C address of PCF8574
void setup() {
  Wire.begin(0, 2); // GPIO0 = SDA, GPIO2 = SCL
}

void loop() {
  Wire.beginTransmission(PCF8574_ADDR);
  Wire.write(0b00000001);  // Turn ON first pin (P0)
  Wire.endTransmission();
  delay(1000);
  Wire.beginTransmission(PCF8574_ADDR);
  Wire.write(0b00000010);  // Turn ON second pin (P1)
  Wire.endTransmission();
  delay(1000);
  Wire.beginTransmission(PCF8574_ADDR);
  Wire.write(0b00000100);  // Turn ON third pin (P2)
  Wire.endTransmission();
  delay(1000);
  Wire.beginTransmission(PCF8574_ADDR);
  Wire.write(0b00001000);  // Turn ON forth pin (P3)
  Wire.endTransmission();
  delay(1000);
}
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
const char* ssid = "IoTthingHuB";    // provide any SSID Name
const char* password = "Test123456"; // provide any SSID Password
WiFiServer server(80);               // Server port 80  
IPAddress local_ip(192,168,10,7);    // Provide Class C IP
IPAddress gateway(192,168,10,7);     // Provide Class C GateWay
IPAddress subnet(255,255,255,0);     // Default SubNet (Not Changable)
WiFi.softAP(ssid, password);         // Creating Soft Access Point
WiFi.softAPConfig(local_ip,gateway,subnet);
Serial.println("Access Point Started!");
server.begin();
<!DOCTYPE html> <html>
<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\">
<title>Load Control</title>
<style>html { font-family: ZCOOL XiaoWei; display: inline-block; margin: 2px auto; text-align: center;}body{margin-top: 40px;}
h1 {color: #0e18f3;margin: 45px auto 25px;}
h3 {color: #050505;margin-bottom: 40px;}
.button {display: block;width: 60px;background-color: #b589f0;border: none;color: white;padding: 15px 25px;text-decoration: none;font-size: 20px;margin: 0px auto 30px;cursor: pointer;border-radius: 5px;}
.button-on {background-color: #b589f0;}
.button-on:active {background-color: #2fd4e0;}
.button-off {background-color: #65537a;}
.button-off:active {background-color: #2fd4e0;}
 p {font-size: 16px;color:#040404;margin-bottom: 12px;}
</style></head><body><h1>Simple Web Server</h1>
<h3> IoT ThingHuB </h3>
<p>LOAD 1 Status: OFF</p><a class=\"button button-on\" href=\"/LED1on\">ON</a>
<p>LOAD 2 Status: OFF</p><a class=\"button button-on\" href=\"/LED2on\">ON</a>
<p>LOAD 3 Status: OFF</p><a class=\"button button-on\" href=\"/LED3on\">ON</a>
<p>LOAD 4 Status: OFF</p><a class=\"button button-on\" href=\"/LED3on\">ON</a>
</body>
</html>
Load Control

Simple Web Server

IoT ThingHuB

LOAD 1 Status: OFF

ON

LOAD 2 Status: OFF

ON

LOAD 3 Status: OFF

ON

LOAD 4 Status: OFF

ON

Load Control

Simple Web Server

IoT ThingHuB

LOAD 1 Status: ON

OFF

LOAD 2 Status: ON

OFF

LOAD 3 Status: ON

OFF

LOAD 4 Status: ON

OFF
<!DOCTYPE html> <html>
<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\">
<title>Load Control</title>
<style>html { font-family: ZCOOL XiaoWei; display: inline-block; margin: 2px auto; text-align: center;}body{margin-top: 40px;}
h1 {color: #0e18f3;margin: 45px auto 25px;}
h3 {color: #050505;margin-bottom: 40px;}
.button {display: block;width: 60px;background-color: #b589f0;border: none;color: white;padding: 15px 25px;text-decoration: none;font-size: 20px;margin: 0px auto 30px;cursor: pointer;border-radius: 5px;}
.button-on {background-color: #b589f0;}
.button-on:active {background-color: #2fd4e0;}
.button-off {background-color: #65537a;}
.button-off:active {background-color: #2fd4e0;}
 p {font-size: 16px;color:#040404;margin-bottom: 12px;}
</style></head><body><h1>Simple Web Server</h1>
<h3> IoT ThingHuB </h3>
<p>LOAD 1 Status: ON</p><a class=\"button button-off\" href=\"/LED1off\">OFF</a>
<p>LOAD 2 Status: ON</p><a class=\"button button-off\" href=\"/LED2off\">OFF</a>
<p>LOAD 3 Status: ON</p><a class=\"button button-off\" href=\"/LED3off\">OFF</a>
<p>LOAD 4 Status: ON</p><a class=\"button button-off\" href=\"/LED4off\">OFF</a>
</body>