ロボティイクス
書道ロボットを作る!!
*ロボティイクス [#fb1f5d30]
**書道ロボットを作る!! [#e4c6ff94]
 #define L(t) OnRev(OUT_A);OnFwd(OUT_C);Wait(t);Off(OUT_AC);//左回転
 #define R(t) OnFwd(OUT_A);OnRev(OUT_C);Wait(t);Off(OUT_AC);//右回転
 #define F(t) OnFwd(OUT_AC);Wait(t);Off(OUT_AC);//前進
 #define B(t) OnRev(OUT_AC);Wait(t);Off(OUT_AC);//後進
 #define pen_up OnFwd(OUT_B);//ペン上げる
 #define pen_down OnRev(OUT_B);;Wait(20);Off(OUT_B);//ペン下げる
 sub edge_curve()//90度右回転
 {
     pen_up;
     F(75);
     R(110);
     B(80);
     pen_down;
     Off(OUT_AC);
     Wait(50);
 }
 task main()
 {
     F(25);//上
     Off(OUT_AC);
     Wait(30);
     pen_up;
     F(80);
     R(100);
     B(50);
     pen_down;//足した
     Off(OUT_AC);
     Wait(50);
     B(60);
     pen_up;
     F(90);
     R(110);
     B(110);
     pen_down;
     Off(OUT_AC);
     Wait(50);
     F(60);
     pen_up;
     F(70);
     R(110);
     B(40);//元二十だった
     pen_down;//田
     Off(OUT_AC);
     Wait(50);
     int i;
     for (i=1; i<=4; i++){
     F(50);
     edge_curve();
     }
     F(28);
     edge_curve();
     F(50);
     B(25);
     edge_curve();
     F(25);
     B(50);
     Off(OUT_B);
 }


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS