#author("2020-02-04T20:00:13+09:00","Hayashi","Hayashi") #author("2020-02-04T20:01:06+09:00","Hayashi","Hayashi") [[2019b/Member]] #contents *²ÝÂê1 [#aace72a7] ÁêÊý¤Î»÷´é³¨¤òÉÁ¤¯¥í¥Ü¥Ã¥È¤òºî¤ë *¥í¥Ü¥Ã¥È¤ÎÀâÌÀ [#s2e22e5b]¡¡ [#b23454de] ¤³¤Î¥í¥Ü¥Ã¥È¤òư¤«¤·¤Æ¡¤°Ê²¼¤Î½çÈÖ¤ÇÉÁ¤¯ +¤Þ¤º¡¤´é¤ÎÎØ³Ô¤òÉÁ¤¯ +¼¡¤Ë¡¤¸ý¤òÉÁ¤¯ +¤½¤·¤Æ¡¤ÌܤòÉÁ¤¯ #ref(005.JPG) ¤³¤Î¥í¥Ü¥Ã¥È¤ò»È¤¦¾å¤Ç¡¤ºÇ½é¤Ï´é¤ÎÎØ³Ô¤ò¥«¥¯¥«¥¯¤Ë¤·¤è¤¦¤È¤·¤Þ¤·¤¿¤¬¡¤´Ý¤¯¤·¤¿Êý¤¬¤¦¤Þ¤¯½ñ¤±¤¿¤¿¤á¡¤¤½¤Î¤è¤¦¤ËÊѹ¹¤·¤Þ¤·¤¿¡¥ #ref(001.JPG) ¤³¤Î¥í¥Ü¥Ã¥È¤Ç¤Ï¡¤²¼¼Ì¿¿¤Î¡¤²¼¤Î»°¤Ä¤Î¥¿¥¤¥ä¤Ç°Üư¤¹¤ë¤è¤¦¤Ë¤·¡¤¿¿¤óÃæ¤Î¥¢¡¼¥à¤ÎÉôʬ¤ò¡¤¾å¤Ë¤¹¤ë¤È¤¤Ë¤Ï¡¤²¿¤âÉÁ¤«¤º¡¤¥¢¡¼¥à¤ò¹ß¤í¤·¤¿¤È¤¤Ë°Üư¤·¤Ê¤¬¤é´é¤òÉÁ¤±¤ë¤è¤¦¤Ë¤·¤Þ¤·¤¿¡¥ ¤³¤Î¥í¥Ü¥Ã¥È¤Ï¡¤Á°ÎؤΰÌÃ֤ǥڥ󤬾夬¤Ã¤¿¤ê²¼¤¬¤Ã¤¿¤ê¤Ç¤¤ë¤è¤¦¤Ë¡¤¥Ú¥ó¤ò¸ÇÄꤹ¤ë¤è¤¦¤Ë¡¤¥¢¡¼¥à¤ò¤È¤ê¤Ä¤±¤Þ¤·¤¿¡¥¤Ê¤Î¤Ç¡¤¥¿¥¤¥ä¤¬¤É¤Î¤è¤¦¤Ë¶Ê¤¬¤ë¤Î¤«¤ò¤·¤Ã¤«¤ê´Ø¿ô¤ò»È¤Ã¤Æ·è¤á¤Æ¤ª¤¯¤³¤È¤¬Âç»ö¤Ç¤·¤¿¡¥ ·çÅÀ¤È¤·¤Æ¤Ï¡¤¸å¤í¤Î¥¿¥¤¥ä(¥â¡¼¥¿¡¼¤Î»È¤ï¤Ê¤¤Éôʬ)¤òºÇ½é¤Ë¤Þ¤Ã¤¹¤°¤Ë¤·¤Ê¤¤¤È¤·¤Ã¤«¤êľ¿Ê¤·¤Æ¤¯¤ì¤Ê¤¤¤³¤È¤¬µó¤²¤é¤ì¤Þ¤¹¡¥¤Þ¤¿¡¤¼ÖÂΤ¬¤«¤Ê¤ê½Å¤¯¤Ê¤Ã¤Æ¤¤¤¿¤¿¤á¡¤¶Ê¤¬¤ë»þ¤Ë¡¤¥¬¥¯¥¬¥¯¤Ëư¤¤¤Æ¤¤¤¿¤Î¤Ç¡¤·ÚÎ̲½¤ÎɬÍ×À¤â´¶¤¸¤Þ¤·¤¿¡¥ *¥×¥í¥°¥é¥à¤ÎÀâÌÀ [#l97137b4] **»ÈÍѤ·¤¿¥×¥í¥°¥é¥à [#l2d40185] #define SPEED 30 #define go6 OnFwd(OUT_BC,SPEED);Wait(1500);Off(OUT_BC); #define go2 OnFwd(OUT_BC,SPEED);Wait(500);Off(OUT_BC); #define go1 OnFwd(OUT_BC,SPEED);Wait(300);Off(OUT_BC); float GetAngle(float d) { const float diameter = 5.5; const float distance=12; float ang = (distance*d)/diameter; return ang; } task main() { go6; int angle1 = GetAngle(360); RotateMotor(OUT_B,SPEED,angle1); go6; RotateMotor(OUT_B,SPEED,angle1); RotateMotor(OUT_A,SPEED,30); int angle2 = GetAngle(90); RotateMotorEx(OUT_BC,SPEED,angle2,-100,true,true); go2; RotateMotor(OUT_A,-SPEED,30); go2; RotateMotor(OUT_A,SPEED,30); go2; int angle3 = GetAngle(120); RotateMotorEx(OUT_BC,SPEED,angle2,100,true,true); go2; RotateMotorEx(OUT_BC,SPEED,angle2,100,true,true); go2; RotateMotor(OUT_A,-SPEED,30); go2; RotateMotor(OUT_A,SPEED,30); go1; RotateMotor(OUT_A,-SPEED,30); go2; RotateMotor(OUT_A,SPEED,30); } **»È¤Ã¤¿¤â¤Î [#q6b032e0] ´Ø¿ô; float GetAngle(float d) { const float diameter = 5.5; const float distance=12; float ang = (distance*d)/diameter; return ang; } ¼ÖÂΤò²ó¤¹³ÑÅÙ¤ò¤³¤Î´Ø¿ô¤Ë¤è¤Ã¤Æ¡¤ÀßÄꤷ¤Þ¤·¤¿¡¥ ÄêµÁ; #define SPEED 30 #define go6 OnFwd(OUT_BC,SPEED);Wait(1500);Off(OUT_BC); #define go2 OnFwd(OUT_BC,SPEED);Wait(500);Off(OUT_BC); #define go1 OnFwd(OUT_BC,SPEED);Wait(300);Off(OUT_BC); go6,go2,go1,¤È¤¤¤¦¤Õ¤¦¤Ëľ¿Ê¤¹¤ëµ÷Î¥¤ä¡¤Â®¤µ¤òÄêµÁ¤·¤Þ¤·¤¿¡¥ taskmain¤Î»ÅÁȤߡ¨ #ref(004_LI.jpg) go6; int angle1 = GetAngle(360); RotateMotor(OUT_B,SPEED,angle1); ¤Þ¤º¡¤´é¤ÎÎØ³Ô¤Î½Ä¤ÎŤ¤Éôʬ¡¢ª¢,Ƭ¤ÎÉôʬ¢¢ª£¤Þ¤Ç¤òÉÁ¤¯ go6; RotateMotor(OUT_B,SPEED,angle1); ¤½¤·¤Æ¡¤£¢ª¤¢ª¡¤Ç¡¤¸µ¤Î°ÌÃÖ¤ËÌá¤ë RotateMotor(OUT_A,SPEED,30); int angle2 = GetAngle(90); RotateMotorEx(OUT_BC,SPEED,angle2,-100,true,true); go2; RotateMotor(OUT_A,-SPEED,30); go2; RotateMotor(OUT_A,SPEED,30); go2; ¥Ú¥ó¤ò¾å¤²¤Æ¡¤¡¤Ç90ÅÙº¸²óž¤·¤¿¸å¡¤¡¢ª¤¤Þ¤Ç¡¤Ä¾Àþ¤Ç¡¤¾¯¤·¤À¤±¿Ê¤ß¡¤¥Ú¥ó¤ò¹ß¤í¤·¡¤¸ý¤òÉÁ¤¤¤¿¸å¡¤¥Ú¥ó¤ò¾å¤²¤Æ¡¤¾¯¤·¿Ê¤ó¤Ç¡¤¤¤ËÅþã¡Ê¥Ú¥ó¤Ï¾å¤¬¤Ã¤¿¾õÂÖ¡Ë ¥Ú¥ó¤ò¾å¤²¤Æ¡¤¡¤Ç90ÅÙº¸²óž¤·¤¿¸å¡¤¡¢ª¤¤ÎÊý¸þ¤Ç¡¤¾¯¤·¤À¤±¿Ê¤ß¡¤¥Ú¥ó¤ò¹ß¤í¤·¡¤¸ý¤òÉÁ¤¤¤¿¸å¡¤¥Ú¥ó¤ò¾å¤²¤Æ¡¤¾¯¤·¿Ê¤ó¤Ç¡¤¤¤ËÅþã¡Ê¥Ú¥ó¤Ï¾å¤¬¤Ã¤¿¾õÂÖ¡Ë RotateMotorEx(OUT_BC,SPEED,angle2,100,true,true); go2; ¤¤Î°ÌÃ֤ǡ¤90ÅÙ±¦²óž¤·¡¤¤¢ª¥¤Þ¤Ç°Üư RotateMotorEx(OUT_BC,SPEED,angle2,100,true,true); go2; RotateMotor(OUT_A,-SPEED,30); go2; RotateMotor(OUT_A,SPEED,30); go1; RotateMotor(OUT_A,-SPEED,30); go2; RotateMotor(OUT_A,SPEED,30); ¥¤Î°ÌÃÖ¤Ç90ÅÙ±¦²óž¤·¡¤¾¯¤·¿Ê¤ó¤Ç¡¤¥Ú¥ó¤ò¹ß¤í¤·¡¤º¸ÌܤòÉÁ¤¤¤Æ¡¤¥Ú¥ó¤ò¾å¤²¡¤¾¯¤·¿Ê¤ó¤Ç¡¤¥Ú¥ó¤ò¹ß¤í¤·¡¤±¦ÌܤòÉÁ¤¤¤Æ¡¤½ªÎ» *¤Þ¤È¤á [#t7e4c65a] ¼ÖÂΤò¤Ê¤ë¤Ù¤¯·Ú¤¯¤¹¤ë¤³¤È¤Ç¡¤¶Ê¤¬¤ëÉéô¤ò¸º¤é¤¹¤³¤È¤¬Âç»ö¤À¤Ã¤¿¤È»×¤¤¤Þ¤¹