In this tutorial we are going to learn. How to display any message on local server using Arduino?
For this tutorial we required Library File that is-
So let’s discuss ESP8266WiFi.h file using Arduino.In our program we need to ESP8266WiFi.h library file,for installing this you have to go the “GitHub URL” https://github.com/esp8266/Arduino this is the officially ESP8266 core for Arduino github and all this step of installation is given in this page.
You just need to copy the URL:- https://arduino.esp8266.com/stable/package esp8266com-index.json
Now go to the Arduino File → Preferences → Paste the above URL in the arduino additional board manager section → Click on ok
Again Go to tools → Board → Board manager→ Write ESP8266 → More info→ Click on INSTALL
Once the installtion completed closed arduino and now we are going to included this ESP8266WiFi.h file.
Put your wifi SSID and Passwaord that you want to connect,80 is port number of webserver.115200 is our defult board rate (you can set as 9600 board rate) serial.println and serial.println function print message on serial monitor.
wifi.begin this funcion gives your SSID and Passward .Which is mention in veriable.In this while loop we check any network is avaliable or not ,If no network is avaliable it only prints dots(…) and if network is avaliable it prints wifi connected and wifi stared wifi.local IP function provides local IP after thae reset your esp8266 node MCU module and Copy these IP http://192.168.2.81 thats printed on your Arduino serial monitor.
i have printed this message in client.println function using HTML code that i want to display on webserver. Let us check these IP on anther computer Type 192.168.2.81 (change as per your esp8266 Node MCU IP address)
Now see these is how you can display any message on webserver.