Subversion Repositories svnkaklik

Rev

Rev 295 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 295 Rev 296
1
program example_program;
1
program example_program;
2
 
2
 
3
var i;
3
var i;
4
var ble;
4
var ble;
5
var last;
-
 
6
 
5
 
7
LMOT := 30;
6
LMOT := 30;
8
RMOT := -30;
7
RMOT := -30;
9
 
8
 
10
ble:=0;
9
ble:=0;
11
while ble<25 do ble:=ble+1; end;	
10
while ble<25 do ble:=ble+1; end;	
12
 
11
 
13
LMOT := 30;
12
LMOT := 30;
14
RMOT := 30;
13
RMOT := 30;
15
 
14
 
16
ble:=0;
15
ble:=0;
17
while ble<125 do ble:=ble+1; end;	
16
while ble<125 do ble:=ble+1; end;	
18
 
17
 
-
 
18
LMOT := 30;
-
 
19
RMOT := -30;
-
 
20
 
19
while true
21
while true
20
do
22
do
21
	if LEYE = 1 and REYE = 1 and RFTOUCH = 0 and LFTOUCH = 0 and RRTOUCH = 0 and LRTOUCH = 0 then
-
 
22
		if last=1 then	
23
	if LEYE = 1 and REYE = 1 then
23
		 RMOT := 30;
-
 
24
		 LMOT := -30;
-
 
25
		else
-
 
26
		 LMOT := 30;
24
		LMOT := 30;
27
		 RMOT := -30;
25
		RMOT := -30;
28
		end;
-
 
29
	end;
26
	end;
30
 
27
 
31
	if LEYE = 0 then
28
	if LEYE = 0 then
32
		LMOT := -30;
29
		LMOT := -30;
33
		RMOT := -30;
-
 
34
		continue;
30
		continue;
35
	end;
31
	end;
36
	if REYE = 0 then
32
	if REYE = 0 then
37
		RMOT := -30;
33
		RMOT := -30;
38
		LMOT := 30;
-
 
39
		continue;
34
		continue;
40
	end;
35
	end;
41
	if LRTOUCH = 1 then
36
	if LRTOUCH = 1 then
42
		RMOT := -30;
37
		RMOT := -30;
43
		LMOT := -30;
38
		LMOT := -20;
44
		last := 1;
-
 
45
	end;
39
	end;
46
	if RRTOUCH = 1 then
40
	if RRTOUCH = 1 then
47
		LMOT :=-30;
41
		LMOT :=-30;
48
		RMOT :=-30;
42
		RMOT :=-20;
49
		last := 0;
-
 
50
	end;
43
	end;
51
 
44
 
52
	if RFTOUCH = 1 and LFTOUCH =1 then
45
	if RFTOUCH = 1 and LFTOUCH =1 then
53
		LMOT :=30;
46
		LMOT :=30;
54
		RMOT := 30;
47
		RMOT := 30;
55
	end;
48
	end;
56
	
49
	
57
	if RRTOUCH = 1 and LRTOUCH =1 then
50
	if RRTOUCH = 1 and LRTOUCH =1 then
58
		LMOT := -30;
51
		LMOT := -30;
59
		RMOT := -30;
52
		RMOT := -30;
60
	end;
53
	end;
61
 
54
 
62
 
-
 
63
end;
55
end;