Advertisement
Guest User

index.html

a guest
Jan 27th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. <html>
  2. <style>
  3. <body style="background-colour:lightyellow;">
  4. h1 {colour:blue}
  5. </style>
  6.  
  7.  
  8.  
  9. <div style="text-align:center">
  10. <h1> Internet Controlled Vehicle </h1>
  11. <br><br>
  12. <iframe src="http://192.168.1.110:9000/javascript_simple.html" frameborder="0" align="left" width="300" height="250" align="middle" scrolling="no"></iframe>
  13.  
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  16. <style>
  17. body {
  18. text-align: center;
  19. }
  20. #g1,
  21. #g2 {
  22. width: 200px;
  23. height: 160px;
  24. display: inline-block;
  25. margin: 1em;
  26. }
  27. </style>
  28. </head>
  29. <h1>DHT22 Sensor Data </h1>
  30. <div id="g1"></div>
  31. <div id="g2"></div>
  32. <hr>
  33. <h3> Last Sensors Reading: {{ time }} ==> <a href="/"class="button">REFRESH</a></h3>
  34. <hr>
  35.  
  36. <script src="var/www/Sensors_Database/dhtWebServer/static/raphael-2.1.4.min.js"></script>
  37. <script src="var/www/Sensors_Database/dhtWebServer/static/justgage.js"></script>
  38. <script>
  39. var g1, g2;
  40. document.addEventListener("DOMContentLoaded", function(event) {
  41. g1 = new JustGage({
  42. id: "g1",
  43. value: {{temp}},
  44. valueFontColor: "yellow",
  45. min: -10,
  46. max: 50,
  47. title: "Temperature",
  48. label: "Celcius"
  49. });
  50. g2 = new JustGage({
  51. id: "g2",
  52. value: {{hum}},
  53. valueFontColor: "yellow",
  54. min: 0,
  55. max: 100,
  56. title: "Humidity",
  57. label: "%"
  58. });
  59. });
  60. </script>
  61.  
  62.  
  63. <br><br>
  64. <button style="height: 75px; width:75px" onmousedown="forward()" onmouseup="stop()" ><img style="height: 65px"src="/html/forwardbutton.png"><br><br>Forward</button>
  65. <img hspace="20">
  66. <br><br><br>
  67. <button style="height: 75px; width:75px" onmousedown="turnleft()" onmouseup="stop()"><img style="height: 65px"src="/html/leftbutton.png"><br><br>Left</button>
  68. <img hspace="20" style="padding-right: 30px">
  69. <button style="height: 75px; width:75px" onmousedown="turnright()" onmouseup="stop()"><img style="height: 65px"src="/html/rightbutton.png"><br><br>Right</button>
  70. <img hspace="20" style="padding-left: 30px">
  71. <br><br><br>
  72. <button style="height: 75px; width:75px" onmousedown="reverse()" onmouseup="stop()"><img style="height: 65px"src="/html/reversebutton.png"><br><br>Reverse</button>
  73. <img hspace="20">
  74.  
  75.  
  76. <br><br><br>
  77. </span>
  78.  
  79. <br><br>
  80. <script Language="Javascript">
  81.  
  82.  
  83. var xmlhttp;
  84. xmlhttp=new XMLHttpRequest();
  85.  
  86.  
  87. function forward()
  88. {
  89. xmlhttp.open("GET","cgi-bin/forward.cgi", true);
  90. xmlhttp.send();
  91. }
  92.  
  93. function stop()
  94. {
  95. xmlhttp.open("GET","cgi-bin/stop.cgi", true);
  96. xmlhttp.send();
  97. }
  98.  
  99. function reverse()
  100. {
  101. xmlhttp.open("GET","cgi-bin/reverse.cgi", true);
  102. xmlhttp.send();
  103. }
  104.  
  105. function turnleft()
  106. {
  107. xmlhttp.open("GET","cgi-bin/turnleft.cgi", true);
  108. xmlhttp.send();
  109. }
  110.  
  111. function turnright()
  112. {
  113. xmlhttp.open("GET","cgi-bin/turnright.cgi", true);
  114. xmlhttp.send();
  115. }
  116.  
  117. </script>
  118. </body>
  119. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement