Skip to content

Instantly share code, notes, and snippets.

@elktros
Created April 21, 2018 06:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elktros/7d27f5a85c60827271f7b635f6cabbf5 to your computer and use it in GitHub Desktop.
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.
<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>
@42Drivertrainer60
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment