Circuit diagram:
  
DESCRIPTION:
Arduino settings :
Most of the code is commented. Some of the important points to highlight
- In the code we need to change the gateway according to our network. 
- Simple method - (For windows) 
- Open command prompt - type “ipconfig” 
- Look for “default gateway”. A set of four numbers will be displayed. In my case its 192.168.xxx.1 
- Note this “xxx” number, goto line in the code where “staticIP” is defined and replace the 3rd number with this number you just found. 
- Ex: default gateway is 192. 169. 255 .1 
So in my code -
IPAddress staticIP (192, 168, 225, 81); //ESP static ip
IPAddress gateway (192, 168, 225, 1);
- Next step is changing SSID and password 
- Replace YOUR_SSID in this line - const char* ssid = "YOUR_SSID" with your wifi name. 
- Replace YOUR_WIFI_PASSWORD in the line const char* password = "YOUR_WIFI_PASSWORD"; with your wifi password. 
ANDROID APP SETTINGS:
- To test the project , open the android app “LINK HERE” , type IP address of the device and same gateway . 
- Now type “CHECK_FIRE_STATUS” keyword in “send” section and hit send. 
In the receive section of the app you will be able to see the response from the arduino device.

Comments