-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathideas.txt
112 lines (74 loc) · 2.18 KB
/
ideas.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
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
States:
0: startup and initializion of sensors
Find line and start communicating with other arduino.
1: startup complete, search for box
Ultrasonic on, Following line.
2: Closing in on box
important: staying straight on the line.
3: found box, grab ball
Close arm, go back a few cm (-> 1) if failing
4: grabbed ball, turn
Hardcoded.
5: near end
Ultrasonic on, Following line.
6: Closing in on Line
7: found second box, drop ball
Simply dropping ball. Waiting.
8: finished.
Done. Standstill.
9: Something unexpected happen.
Propagate to the other and stop doing anything at all.
Übertragung:
(immer) beide Richtungen: momentaner Zustand.
(immer) lichtsensoren-infos an Ultraschall
(immer) Neueste distanz vom Ultraschall
2, 6: 3 Lichtsensoren an Fahrenden
3: grabbing state of ball
7: state of dropping ball
Arduinos changing state:
transmitting each time?
Existence per state per arduino:
State Grabber Follower
0 X X
1 X X
2 X X
3 X .
4 X
5 X X (equal to one?)
6 X X (equal to two?)
7 X .
8 X X
9 X X
DoNoting X 3, 7
DoNothing X 4
Folgende Pinbelegungen:
int lshl = 3; //DIG READ
int lsl = 4; //DIG READ
int lsr = 7; //DIG READ
int lshr = 8; //DIG READ
int lsm = 0; //ANALOG TO DIG READ
int lshlval = 0;
int lslval = 0;
int lsrval = 0;
int lshrval = 0;
int lsmval = 0; //VORDERE SENSORREIHE
int hlsl = 1; //ANALOG TO DIG READ
int hlsm = 2; //ANALOG TO DIG READ
int hlsr = 3; //ANALOG TO DIG READ
int hlslval = 0;
int hlsmval = 0;
int hlsrval = 0; //HINTERE SENSORREIHE
int ustr = 2; //DIG WRITE
int usec = 11; //DIG READ
int usval = 0; //ULTRASCHALL
int grs = 4; //ANALOG TO DIG READ
int grser = 12; //DIG WRITE
int grsval = 0; //GREIFER
int molpl = 5; //ANALOG WRITE
int molmi = 9; //ANALOG WRITE
int morpl = 6; //ANALOG WRITE
int mormi = 10; //ANALOG WRITE //MOTOREN
ls = liniensensor
us = ultraschall
mo = motor
gr = greifer