<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> HTML5 Slider </title>
<script type="text/javascript">
function showValue(num){
var result = document.getElementById('result');
result.innerHTML = num;
}
</script>
</head>
<body>
<input type="range" id="sliderBar" min="0" max="100" step="10" value="0" onChange="showValue(this.value);"/>
<div id="result" style="height:20px;width:30px;border:1px solid #999">
</div>
</body>
</html>I'm learning
This part has the value change in it.
onChange="showValue(slider.value);"/>\n')-- create a server
-- 30s time out for a inactive client
sv=net.createServer(net.TCP, 30)
-- server listen on 80,
-- if data received, print data to console,
-- then send "hello world" to remote.
sv:listen(80,function(c)
c:on("receive", function(c, pl)
print(pl)
end)
c:send('<!DOCTYPE html>\n')
c:send('<html xmlns="http://www.w3.org/1999/xhtml">\n')
c:send('<head>\n')
c:send('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n')
c:send('<title> HTML5 Slider </title>\n')
c:send('<script type="text/javascript">\n')
c:send('function showValue(num){\n')
c:send('var result = document.getElementById("result");\n')
c:send('result.innerHTML = num;\n')
c:send('}\n')
c:send('</script>\n')
c:send('</head>\n')
c:send('<body>\n')
c:send('<input type="range" id="sliderBar" min="0" max="100" step="10" value="0" onChange="showValue(slider.value);"/>\n')
c:send('<div id="result" style="height:20px;width:30px;border:1px solid #999">\n')
c:send('</div>\n')
c:send('</body>\n')
c:send('</html>\n')
end)Anyways I about got it just need to figure how
string.findAllow my device to be connected to via my IP so that it is visible may have to port fwd specific ports on my router or somehow allow everything to flow through port 80.
Allow Write 1 or 0 (on/off) to gpio pins
Allow read of all pins status on page load
I need to figure a lot out I have complete lack of know how but hey it is my project so I don't expect people to do the work for me but some examples would be rather helpful so you can look and go ohhhh this part is done. But I suppose inventing the wheel one may learn more on the plus side but to retain it all you have to use it often. This is maybe my 3rd or fourth project that I ever wanted to do that involved programming of any sort lol so for not really being a programmer I consider what has been done so far an accomplishment www.icepik.tk
Where I buy my ESP8266 boards from... (Banggood)