-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
122 lines (110 loc) · 3.33 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<html>
<head>
</head>
<style>
body {background-color: lightyellow}
h1 {color:blue}
button {
color: blue;
background:lightgrey;
border: 1px solid #000;
border-radius: 8px;
position: center;
}
</style>
<body>
<div style="text-align:center">
<h1> MJRoBot RPi Web Robot Control <img style="height: 100px"src="/images/robot52.png"> </h1>
<br><br>
<button style="height: 50px; width: 100px" onclick="lighton()"><img style="height: 40px"src="images/lighton.png"></button>
<img hspace="20" style="padding-left: 200px">
<button style="height: 50px; width: 100px" onclick="lightoff()"><img style="height: 35px"src="images/lightoff.png"></button>
<br><br>
<span style="display:inline-block;padding:5px;border:1px solid #fc0; font-size: 140%;font-weight: bold;">
<br>
<button style="height: 75px; width: 75px" onclick="forward()"><img style="height: 65px"src="images/forward.png"></button>
<br><br><br><br>
<img hspace="10" style="padding-left: 5px">
<button style="height: 75px; width: 75px" onclick="left()"><img style="height: 65px"src="images/left.png"></button>
<img hspace="20" style="padding-left: 10px">
<button style="height: 75px; width: 75px" onclick="stop()"><img style="height: 63px"src="images/stop.png"></button>
<img hspace="20" style="padding-left: 10px">
<button style="height: 75px; width: 75px" onclick="right()"><img style="height: 65px"src="images/right.png"></button>
<img hspace="10" style="padding-left: 5px">
<br><br><br><br>
<button style="height: 75px; width: 75px" onclick="reverse()"><img style="height: 65px"src="images/reverse.png"></button>
<br><br><br>
<p>Motor speed control</p>
<img hspace="10" style="padding-left: 5px">
<button style="height: 50px; width: 50px; font-size: 18px" onclick="nospeed()">0</button>
<img hspace="30" style="padding-left: 20px">
<button style="height: 50px; width: 50px; font-size: 18px" onclick="lowspeed()">--</button>
<img hspace="30" style="padding-left: 20px">
<button style="height: 50px; width: 50px; font-size: 18px" onclick="regularspeed()">==</button>
<img hspace="30" style="padding-left: 20px">
<button style="height: 50px; width: 50px; font-size: 18px" onclick="highspeed()">++</button>
<img hspace="10" style="padding-left: 5px">
<br><br>
</span>
</div>
<script>
var xmlhttp;
xmlhttp=new XMLHttpRequest();
function lighton()
{
xmlhttp.open("GET","cgi-bin/lighton.cgi",true);
xmlhttp.send();
}
function lightoff()
{
xmlhttp.open("GET","cgi-bin/lightoff.cgi",true);
xmlhttp.send();
}
function forward()
{
xmlhttp.open("GET","cgi-bin/forward.cgi",true);
xmlhttp.send();
}
function stop()
{
xmlhttp.open("GET","cgi-bin/stop.cgi",true);
xmlhttp.send();
}
function left()
{
xmlhttp.open("GET","cgi-bin/left.cgi",true);
xmlhttp.send();
}
function right()
{
xmlhttp.open("GET","cgi-bin/right.cgi",true);
xmlhttp.send();
}
function reverse()
{
xmlhttp.open("GET","cgi-bin/reverse.cgi",true);
xmlhttp.send();
}
function lowspeed()
{
xmlhttp.open("GET","cgi-bin/lowspeed.cgi",true);
xmlhttp.send();
}
function regularspeed()
{
xmlhttp.open("GET","cgi-bin/regularspeed.cgi",true);
xmlhttp.send();
}
function highspeed()
{
xmlhttp.open("GET","cgi-bin/highspeed.cgi",true);
xmlhttp.send();
}
function nospeed()
{
xmlhttp.open("GET","cgi-bin/nospeed.cgi",true);
xmlhttp.send();
}
</script>
</body>
</html>