Thursday, January 15, 2009

basic Interactive C codes. 1/15/09

This is the first code i wrote in interactive C.

void main()

{
fd(1);
bk(2);
printf("hey");
sleep(3.0);
bk(1);
fd(2);
sleep(5.0);
fd(1);
bk(2);
printf("bye");
off(1);

}


This is the code i wrote to put on the Roomba.

`void main()
{
beep();
fd(1);
fd(2);
sleep(1.0);
fd(1);
bk(2);
sleep(0.5);
beep();
}

No comments: