[[2018a/Member]]
課題

*課題1 [#o322c2f3]
自分に関係する、2文字以上の地名を選び、それをA4の紙に書くロボットを作製する。
**選んだ文字 [#tb0eedf8]
長野にある「村山」という地名を選びました。

*ロボットの説明 [#na9486b6]
 	#define straight OnRev(OUT_A); //X方向の前移動
	#define back OnFwd(OUT_A); //X方向の後ろ移動
	#define stopA Off(OUT_A); //モーターAの停止
	#define stopB Off(OUT_B); //モーターBの停止
	#define right OnFwd(OUT_B); //Y方向の右移動
	#define left OnRev(OUT_B); //Y方向の左移動
	#define up OnFwd(OUT_C);Wait(50);Off(OUT_C); //ペンを上げる
	#define down OnRev(OUT_C);Wait(50);Off(OUT_C); //ペンを下げる
	#define freez Wait(15); //一時停止

task main()
{
	down; //1角目
	straight;
	Wait(40); //a
	stopA;
	freez;
	up;

	straight;
	Wait(10); //b
	stopA;
	freez;


	down; //2角目
	straight;
	Wait(40); //c
	stopA;
	freez;
	up;

	back;
	Wait(70); //d
	stopA;
	freez;
	left;
	Wait(30); //e
	stopB;
	freez;


	down; //3角目
	right;
	Wait(100); //f
	stopB;
	freez;
	up;

	left;
	Wait(40); //g
	stopB;
	back;
	Wait(15); //h
	stopA;
	freez;


	down; //4角目
	left;
	straight;
	Wait(20); //h
	stopA;
	stopB;
	freez;
	right;
	straight;
	Wait(10); //i
	stopA;
	stopB;
	freez;
	up;
	
	left;
	Wait(55); //j
	stopB;
	straight;
	Wait(50); //k
	stopA;
	freez;


	down; //5角目
	right;
	Wait(100); //l
	stopB;
	freez;
	left;
	back;
	Wait(10); //m
	stopA;
	stopB;
	freez;
	up;

	left;
	Wait(30); //n
	stopB;
	back;
	Wait(20); //o
	stopA;
	freez;


	down; //6角目
	right;
	straight;
	Wait(10); //p
	stopA;
	stopB;
	freez;
	up;

	left;
	Wait(50); //r
	stopB;
	straight;
	Wait(90); //q
	stopA;
	freez;


	down; //7角目
	right;
	Wait(80); //s
	stopB;
	freez;
	up;

	left;
	Wait(40); //t
	stopB;
	back;
	Wait(30); //u
	stopA;
	freez;


	down; //8角目
	right;
	Wait(30); //u
	stopB;
	freez;
	straight;
	Wait(80); //v
	stopA;
	freez;
	left;
	Wait(30); //w
	stopB;
	freez;
	up;

}


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