Created
April 21, 2018 06:00
-
-
Save elktros/7d27f5a85c60827271f7b635f6cabbf5 to your computer and use it in GitHub Desktop.
HTML Code for WiFi Controlled Robot using ESP8266 and Arduino. This code creates a web page for controlling the Robot.
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
<html> | |
<head> | |
<title>WiFi Controlled Robot</title> | |
</head> | |
<body> | |
<h2> <i> WiFi Controlled Robot using Arduino and ESP8266 </i> </h2> | |
<h5> <i> by ElectronicsHub.org </i> </h5> | |
<button id="FWD" class="robot">FORWARD</button> | |
<button id="REV" class="robot">REVERSE</button> | |
<button id="RGT" class="robot">RIGHT</button> | |
<button id="LFT" class="robot">LEFT</button> | |
<button id="STP" class="robot">STOP</button> | |
<script src="jquery.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() | |
{ | |
$(".robot").click(function() | |
{ | |
var cmd = $(this).attr('id'); | |
$.get("http://192.168.1.254:80/", {robot:cmd}); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HI I could`nt find a download button on this page so I coped and pasted it in to Arduino IDE, when I try to verify and compile I get and error message "expected unqualified-id before "<"token at line 1