| 
 else if(MY_DATA1[D+2] == 'E')//switch 3 on { 
MY_DATA1[D+2] = '0'; 
digitalWrite(A2,LOW); 
RX1 = 0; 
} 
else if(MY_DATA1[D+2] == 'F')//switch 1 off { 
MY_DATA1[D+2] = '0'; 
digitalWrite(A2,HIGH); 
RX1 = 0; 
} 
else if(MY_DATA1[D+2] == 'G')//switch 1 on 
{ 
MY_DATA1[D+2] = '0'; 
digitalWrite(A3,LOW); 
RX1 = 0; 
} 
else if(MY_DATA1[D+2] == 'H')//switch 1 off 
{ 
MY_DATA1[D+2] = '0'; 
digitalWrite(A3,HIGH); 
RX1 = 0; 
} 
} 
} 
RX1 = 0; 
} 
} 
void ESP8266_INIT()// initializing wi-fi module. 
{ 
Serial.println("AT");// check AT mode. 
delay(1000); 
Serial.println("AT+RST");//RESET module. 
delay(3000); 
Serial.println("AT+CWSAP=\"Home
Automation\",\"2231anto\",3,2");//set the 
ssid and password. 
delay(1500); 
Serial.println("AT+CWMODE=3");// set ESP8266 in MODE 3 (Both
mode 
AP+station). 
delay(1400); 
Serial.println("AT+CIPMUX=1");// set ESP8266 in MUX 1 (allow
multiple 
connection). 
delay(1400); 
Serial.println("AT+CIPSERVER=1,80");// start communication
ESP8266 on 
PORT80. 
delay(1500); 
} 
//[14:09, 25/11/2021] Constant Kunambu @ Aniteck-Glob:
Notes: 
 |