Create ESP8266 web server using Arduino IDE. Learn about connecting it to Wi-Fi and creating a web server using a sample text containing web page.
Make a circuit as per the programming ESP8266 with Arduino Board.
This is code for Creating ESP8266 web server. First, we initialized server at port 80 and two constants for Wi-Fi SSID and Password. In setup, Serial started at 115200 baud to check the status of ESP8266. Wi-Fi begins to connect with SSID and Password and waited till it connects to the Wi-Fi. Print the Local IP to Serial monitor to use that address as Web server address. Created an index page with the text “Hello! This is an index page.” using the server.on and server.send as you can see in code. And at last, Begin the Server. In loop, server.handleClient() is used for Handling incoming client requests
Make a circuit as per above-given diagram to upload code to ESP8266. Make changes to SSID and Password in code and upload the code to ESP8266 using Arduino IDE. Open the Serial monitor IP in your browser after Serial monitor shows “Server listening” It will look like as blow given screenshot.
For information about uploading code to ESP8266 Click Here.
View original article for Creating Web Server Using ESP8266 on Iotguider