You are on page 1of 4

SAMPLE PROGRAM

5
3

4
3 2
2

1 1

Example 1
#include "main.h"
int main(void)
{
start(1,300); //
linecolor(BLACK); //
sensor(FF); //
error(1,2000); //
motorspeed(FAST); //
driver(20,18,15,13); // to setting back the track

line(pp,ff,20,0); // 1
line(pp,ff,20,0); // 2
line(pp,ll,20,40); // 3
end(); //
return 0;
}

Example 2
##include "main.h"
int main(void)
{
start(1,300); //
linecolor(BLACK); //
sensor(FF); //
error(1,2000); //
motorspeed(FAST); //
driver(20,18,15,13); // to setting back the track

line(pp,ff,20,0); // 1
line(pp,ll,20,40); // 2
line(pp,rr,20,40); // 3
line(pp,rr,20,20); // 4
line(pp,ss,20,0); // 5
end(); //
return 0;
}

8 9
2

7
6 5
1
10

Example 3
#include "main.h"

int main(void)
{
start(1,300); //
linecolor(BLACK); //
sensor(FF); //
error(1,2000); //
motorspeed(FAST); //
driver(20,18,15,13); // to setting back the track

line(pp,ff,20,0); //1
line(pp,ff,20,0); //2
line(pp,ll,20,0); //3
left(20,0); //4
line(pp,rr,20,20); //5
line(pp,ff,20,0); //6
line(pp,rr,20,0); //7
right(20,0); //8
line(pp,rr,20,0); //9
line(pp,ff,20,0); //10
end(); //
return 0;
}
1 2

9 8 7 6

4 5

Example 4
#include "main.h"

int main(void)
{
start(1,300); //
linecolor(BLACK); //
sensor(FF); //
error(1,2000); //
motorspeed(FAST); //
driver(20,18,15,13); // to setting back the track

line(pp,ff,20,0); //1
line(pp,rr,20,20); //2
line(pp,ff,20,0); //3
line(pp,ll,20,20); //4
line(pp,ll,20,0); //5
left(20,0); //6
line(pp,ff,20,0); //7
line(pp,ff,20,0); //8
line(pp,ff,20,0); //9
end();
return 0;
}

You might also like