Fist
we discuss about HTML codes and will know how it’s working. In the given HTML
codes a input box will present, you can enter your ESP8266 IP address in input
box and click on “Get Data” button. You should get a refreshed page and
display data that sent by ESP8266.
---------------------------------------------------------------------------------------------------------
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<body>
Enter your device's IP address: <input type="text" id="myText" value="xxx.xxx.xxx.xxx">
<button onclick="myFunction()">Get Data</button>
<script>
function myFunction()
{
var x = document.getElementById("myText").value;
window.location = "http://" + x;
}
</script>
</body>
</html>
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
You
can copy codes and paste in Notepad and save as .html format. You can open .html
file with your browser, web-page will look like above image in both cases (codes
added in website or open .html file with browser).
Referring to article "ESP8266 wifi module basic" for configuration of ESP8266 module as a server with "Terminal" or "ESP8266 User Program" application. You should follow all of the given AT command step by step except to data transmission AT commands. Data transmission commands will use when any request comes.
No comments:
Post a Comment