-
Notifications
You must be signed in to change notification settings - Fork 2
/
docs.txt
33 lines (24 loc) · 1.04 KB
/
docs.txt
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
Sockets:
How to build a socket command:
all commands have the same start of 3 bytes, the structure is shown below:
Common:
[00-01] sensor/acurator code (always 2 bytes/chars like: "CP" for compas)
[02] (r|a|i) request|answer|instruction (requests are used to get snesor data, and are answerd with an answer)
Request:
compass:'CP' [03-03]
speed:'SP' [03-03]
distance:'DT' [03-06]
[03-06] direction to measure "-180" to "+180"
Answer: numbers are send in human readable chars (send "0600" for 600)
compass:'CP' [03-06]
[03-06] degrees form north
speed:'SP' [03-07]
[03-07] speed in "-1024" to "+1024"
distance:'DT' [03-10]
[03-06] 0 to 9999 cm
[07-10] -180 to +180 direction of mesearment (send "-180" for -180º and "+180" for 180º)
Instruction: instructions are most of the time send from the client to the robot, for movement.
drive:'DR'
[03-07] left speed "-1024" to "+1024"
[08-12] right speed "-1024" to "+1024"
stop:'ST' (does not need more than 3 bytes)