Go to most recent revision | Blame | Last modification | View Log | Download
program Orbis;
var line, Rychlost, Zataceni;
#define L 1
#define S 2
#define R 3
line:=2;
Rychlost:=15; # omezeni rychlosti (hlavne pro ladici ucely)
Zataceni:=0.75;
while true
do
if LEYE = 0 and CEYE = 1 and LEYE = 0 then
LMOT:=Rychlost;RMOT:=Rychlost;
line:=2;
continue;
end;
if LEYE = 1 and CEYE = 1 then # Cara pod levim sensorem
LMOT:=0;RMOT:=Rychlost*Zataceni; # jed rovne
line:=1; # zaznamenej, kdes videl caru
continue;
end;
if REYE = 1 and CEYE = 1 then
LMOT:=Rychlost*Zataceni;RMOT:=0;
line:=3;
continue;
end;
end;