-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
67 lines (55 loc) · 1.76 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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <h1
align="center"> Selamat Mencoba Project SUROCAM! Project ini masi dalam
tahap prototipe</h1>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="height=device-height, width=420, user-scalable=no" />
<title>CamBot</title>
<script type="text/javascript" src="/webiopi.js"></script>
<script type="text/javascript">
function init() {
var button;
button = webiopi().createButton("bt_up", "maju", go_forward, stop);
$("#up").append(button);
button = webiopi().createButton("bt_left", "kiri", turn_left, stop);
$("#middle").append(button);
button = webiopi().createButton("bt_stop", "X", stop);
$("#middle").append(button);
button = webiopi().createButton("bt_right", "kanan", turn_right, stop);
$("#middle").append(button);
button = webiopi().createButton("bt_down", "mundur", go_backward, stop);
$("#down").append(button);
}
function go_forward() {
webiopi().callMacro("go_forward");
}
function go_backward() {
webiopi().callMacro("go_backward");
}
function turn_right() {
webiopi().callMacro("turn_right");
}
function turn_left() {
webiopi().callMacro("turn_left");
}
function stop() {
webiopi().callMacro("stop");
}
webiopi().ready(init);
</script>
<style type="text/css">
button {
margin: 5px 5px 5px 5px;
width: 80px;
height: 70px;
font-size: 15pt;
font-weight: bold;
color: black;
}
</style> </head> <body>
<div id="content" align="center">
<img width="320" height="240" src="http://iplokalraspberry:8090/?action=stream"><br/>
<div id="up"></div>
<div id="middle"></div>
<div id="down"></div>
</div> </body> </html>