- 追加された行はこの色です。
- 削除された行はこの色です。
*右文字のプログラム [#b86207d1]
void go_straight(int t)
{
OnFwd(OUT_A+OUT_C);
Wait(t);
Off(OUT_A+OUT_C);
}
void turn_right(int t)
{
OnRev(OUT_A);
OnFwd(OUT_C);
Wait(t);
Off(OUT_A+OUT_C);
}
void turn_left(int t)
{
OnRev(OUT_C);
OnFwd(OUT_A);
Wait(t);
Off(OUT_A+OUT_C);
}
void pen_down()
{
OnRev(OUT_B);
Wait(20);
Wait(15);
Off(OUT_B);
}
void pen_up()
{
OnFwd(OUT_B);
Wait(15);
Wait(14);
Off(OUT_B);
}
void go_back(int t)
{
OnRev(OUT_A+OUT_C);
Wait(t);
Off(OUT_A+OUT_C);
}
task main()
{
pen_down();
OnRev(OUT_A);
Wait(200);
Off(OUT_A);
pen_up();
turn_left(180);
go_straight(65);
turn_right(190);
pen_down();
go_straight(95);
pen_up();
go_straight(290);
turn_left(330);
go_straight(320);
turn_left(225);
go_straight(20);
go_straight(10);
turn_left(180);
go_back(110);
pen_down();
go_straight(40);
go_back(45);
pen_up();
}
go_straight(125);
turn_right(180);
go_back(80);
pen_down();
go_straight(50);
pen_up();
go_straight(82);
turn_left(180);
go_back(85);
pen_down();
go_back(45);
pen_up();
go_straight(90);
turn_right(180);
go_back(135);
pen_down();
go_straight(50);
}