Created
April 6, 2018 07:00
-
-
Save elktros/6d55a7f3ea938558730fa280527ae03a to your computer and use it in GitHub Desktop.
HTML Code for creating a simple Web Page for Web Controlled Servo using ESP8266.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html > | |
<html> | |
<head> | |
<title>Web controlled Servo</title> | |
<script src="myjquery.js"></script> | |
</head> | |
<body> | |
<h2> <b> Web Controlled Servo using ESP8266 </b> </h2> | |
<h3> Slide to move the Servo </h3> | |
<input type="range" min="10" max="170" onmouseup="myservo(this.value)" /> | |
</body> | |
<script> | |
$.ajaxSetup({timeout:1000}); | |
function myservo(angle) | |
{ | |
IPVar = "192.168.1.254"; | |
ArduinoData = "http://" + IPVar + ":80"; | |
$.get( ArduinoData, { "servo": angle }) ; | |
{Connection: close}; | |
} | |
</script> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment