[[2018a/Member]] 目次 #contents *課題1 [#o322c2f3] これまで住んだことのある都道府県名、市町村名、地区名などの中から&br; 2文字以上のものを選び、それをA4の紙を書くロボットを製作せよ。 **選んだ文字 [#tb0eedf8] 長野にある&color(#32cd32){「村山」};という地名を選びました。 *ロボットの説明 [#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; } *完成した文字 [#oaef5485]