-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProtocol.txt
More file actions
43 lines (33 loc) · 773 Bytes
/
Protocol.txt
File metadata and controls
43 lines (33 loc) · 773 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
31
32
33
34
35
36
37
38
39
40
41
42
43
PROTOKOLL
Aufbau einer Übermittlung:
<byte> Paketlänge
<byte[Paketlänge]> Paket
Direkt nach Verbindungsaufbau sendet der Arduino:
<byte> Handshake: 255 (erstes Byte der Übertragung, auf das der PC warten sollte)
<byte> Kommandobyte: 0
<byte> Arduino-ID ( 0 => Sensorsystem, 1 => Lidar)
Befehler vom Computer:
<byte> Kommandobyte
<bytes> Weitere Bytes zum spezifizieren des Befehles
Rückgabe mit gleichem Kommandobyte.
GLOBALE BEFEHLE:
1 => Setup
{
Rückgabe: <byte> Bestätigung: 1
}
BEFEHLE FÜRN LIDAR:
10 => Scan starten
{
<byte> Umdrehungen pro Sekunde
Rückgabe: <byte> Bestätigung: 1
}
11 => Scan stoppen
{
Rückgabe: <byte> Bestätigung: 1
}
EREIGNISSE VOM LIDAR:
100 => Messwert aufgenommen
{
<float> Winkel
<short> Entfernungswert (-1 => Kein Messwert)
}