-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
30 lines (29 loc) · 963 Bytes
/
Copy pathindex.html
File metadata and controls
30 lines (29 loc) · 963 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>WASD Steuerung</title>
<style>
body { font-family: sans-serif; text-align: center; margin-top: 50px; }
button { font-size: 1.5em; margin: 10px; padding: 15px 30px; }
</style>
</head>
<body>
<h1>WASD Motorsteuerung</h1>
<button onclick="send('w')">W – beide vorwärts</button>
<button onclick="send('s')">S – beide rückwärts</button><br>
<button onclick="send('a')">A – links drehen</button>
<button onclick="send('d')">D – rechts drehen</button><br>
<button onclick="send('e')">E – Aktuator ausfahren</button>
<button onclick="send('r')">R – Aktuator einfahren</button>
<script>
const token = "meinSuperGeheimerToken123";
function send(cmd) {
fetch("/api/control", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ token, cmd })
});
}
</script>
</body>
</html>