Subversion Repositories svnkaklik

Rev

Rev 294 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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