[[2016a/Member]] #contents *¤Ï¤¸¤á¤Ë [#xfef67aa] º£²ó¤Î²ÝÂê¤Ï¡¢»æ¥³¥Ã¥×¤ò±¿¤Ö¥í¥Ü¥Ã¥È¤ÎºîÀ®¤·¡¢²ÝÂꣲ¤Î¥³¡¼¥¹¤òÍѤ¤¤Æ»æ¥³¥Ã¥×¤ò½êÄê¤Î°ÌÃÖ¤Ë ±¿¤Ó¡¢±¿¤ó¤À»æ¥³¥Ã¥×¤ò½Å¤Í¤ë¥¿¥¤¥à¥ì¡¼¥¹¤ò¹Ô¤¤¤Þ¤·¤¿¡£ ¥í¥Ü¥Ã¥È¤ò£±Âæ¤Ç¹Ô¤¦Èɤ¬Â¿¤¯¤¤¤Þ¤·¤¿¤¬¡¢»ä¤¿¤Á¤Ï£²Âæ¤Î¥í¥Ü¥Ã¥È¤ò»È¤Ã¤Æ²ÝÂê¤ò¹Ô¤¤¤Þ¤·¤¿¡£ *¥í¥Ü¥Ã¥È¤ÎÀâÌÀ [#o419d2af] **¥¹¥ì¡¼¥Ö [#y3beb55c] £±Âæ(¥¹¥ì¡¼¥Ö)¤Ï¡¢¥é¥¤¥ó¥È¥ì¡¼¥¹¤ò¤·¤ÆC¤Ë»æ¥³¥Ã¥×¤ò¼è¤ê¤Ë¹Ô¤¡¢Q¤Þ¤Ç±¿¤ÖÌòÌÜ¡£ ¥¢¡¼¥à¤ò¾®¤µ¤¯¤·¡¢°ì²ó¤Ç²¿¸Ä¤â±¿¤Ö¤Î¤Ç¤Ï¤Ê¤¯³Î¼Â¤Ë°ì¸Ä¤º¤Ä±¿¤Ù¤ë¥µ¥¤¥º¤Ë¤·¤Þ¤·¤¿¡£ #ref(robot.png) **¥Þ¥¹¥¿¡¼ [#oce7f76c] ¤â¤¦£±Âæ(¥Þ¥¹¥¿¡¼)¤Ï¡¢Ê̤Υí¥Ü¥Ã¥È¤¬±¿¤ó¤Ç¤¤¿»æ¥³¥Ã¥×¤òQ¤«¤éP¤Ë±¿¤Ó¡¢»æ¥³¥Ã¥×¤ò»ý¤Á¾å¤²¤Æ ½Å¤Í¤ëÌòÌÜ¡£¤³¤Á¤é¤Î¥í¥Ü¥Ã¥È¤Ï¡¢ÊÒÊý¤Î¥í¥Ü¥Ã¥È¤ÈÈæ¤Ù¤Æ¥¢¡¼¥à¤¬Èó¾ï¤ËÂ礤¯ ư¤¤¤Æ¤ë¤Î¤ò¸«¤Æ¤¤¤ë¤È¡¢¿Æ¤¬½é¤á¤Æ»Ò¶¡¤ò°ì¿Í¤ÇÇ㤤ʪ¤Ë½Ð¤·¡¢¤½¤Îµ¢¤ê¤òÂԤäƤ¤¤ë¤«¤Î¤è¤¦¤Ê µ¤»ý¤Á¤Ë¤µ¤»¤é¤ì¤Þ¤·¤¿¡£ #ref(robot55.png) **¥¢¡¼¥à¤Îưºî¤ÎÀâÌÀ [#ofb64afb] #ref(̵Âê.png) ¥¢¡¼¥à¤ÏÌð°õ¤ÎÊý¸þ¤Ëư¤¡¢¥ª¥ì¥ó¥¸¤ÇÅɤê¤Ä¤Ö¤·¤¿¤È¤³¤í¤Ç»æ¥³¥Ã¥×¤òÄϤߤޤ¹¡£ #ref(robot66.png) ¾å¤Ç¹Ô¤Ã¤¿Æ°ºî¤Î¤¢¤È¡¢´Ý¤Ç°Ï¤ó¤À¥®¥¢¤¬Æ°¤»æ¥³¥Ã¥×¤ò»ý¤Á¾å¤²¤Þ¤¹¡£ ¤³¤³¤ÎÈùÄ´À°¤¬°ìÈÖÂçÊѤǤ·¤¿¡£ *¥×¥í¥°¥é¥à [#s59d4904] ***Ãí°Õ [#b27b0212] ¥¹¥ì¡¼¥Ö¤Î¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ¤Ï¡¢¡ÖAri¡×¡¢¡ÖEtu¡×¡¢¡ÖTea¡×¤Î¥Ú¡¼¥¸¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ **float´Ø¿ô [#s78b8727] float GetAngle(float d) /* d¤Ë¤Ï¿Ê¤ß¤¿¤¤µ÷Î¥¤¬Æþ¤ë */ { const float diameter=5.45; //¥¿¥¤¥ä¤Îľ·Â(Ñ) const float pi=3.1415; //±ß¼þΨ(¦Ð) float ang =d/(diameter*pi)*360.0; //³ÑÅÙ¤ò·×»»¤¹¤ë return ang; //³ÑÅÙ¤òÊÖ¤¹¡¡ } **ÄêµÁ [#z8217648] ¥¢¡¼¥à¤òư¤«¤¹ÄêµÁ¡£¾å¤¬»æ¥³¥Ã¥×¤òÄϤà¤È¤¤Î¥×¥í¥°¥é¥à¤Ç¤¢¤ê¡¢²¼¤¬ÄϤó¤À»æ¥³¥Ã¥×¤òÎ¥¤¹¥×¥í¥°¥é¥à¤Ç¤¢¤ë¡£ #define Tozire RotateMotor(OUT_A,50,800);//±¦Àû²ó(¥â¡¼¥¿B¤ÈC¤ò35%¤Î¥¹¥Ô¡¼¥É¤ÇƱ´ü¤µ¤»¤º90ÅÙÁ°Å¾) #define Hirake RotateMotor(OUT_A,-25,800);//º¸Àû²ó(¥â¡¼¥¿B¤ÈC¤ò35%¤Î¥¹¥Ô¡¼¥É¤ÇƱ´ü¤µ¤»¤º90ÅÙ¸åž) 90Åٲ󞤵¤»¤ëÄêµÁ¡£ #define Ninety GetAngle(8.25) ¾å¤¬lcmÁ°¿Ê(¥â¡¼¥¿B¤ÈC¤ò25%¤Î¥¹¥Ô¡¼¥É¤ÇƱ´ü¤µ¤»¤ÆlcmʬÁ°Å¾)¤µ¤»¤ë¥×¥í¥°¥é¥à¤Ç¤¢¤ê¡¢²¼¤¬lcm¸å¿Ê(¥â¡¼¥¿B¤ÈC¤ò25%¤Î¥¹¥Ô¡¼¥É¤ÇƱ´ü¤µ¤»¤Ælcmʬ¸åž)¤µ¤»¤ë¥×¥í¥°¥é¥à¤Ç¤¢¤ë¡£ #define Turn_r RotateMotorEx(OUT_BC,35,Ninety,-100,true,false); #define Turn_l RotateMotorEx(OUT_BC,35,Ninety,100,true,false); lcmʬ²óž¤µ¤»¤ë¥×¥í¥°¥é¥à¡£ #define Rotary(l) GetAngle(l) ¾å¤¬±¦Àû²ó(¥â¡¼¥¿B¤ÈC¤ò35%¤Î¥¹¥Ô¡¼¥É¤ÇƱ´ü¤µ¤»¤º90ÅÙÁ°Å¾)¤µ¤»¤ë¥×¥í¥°¥é¥à¤Ç¤¢¤ê¡¢²¼¤¬º¸Àû²ó(¥â¡¼¥¿B¤ÈC¤ò35%¤Î¥¹¥Ô¡¼¥É¤ÇƱ´ü¤µ¤»¤º90ÅÙ¸åž)¤µ¤»¤ë¥×¥í¥°¥é¥à¤Ç¤¢¤ë¡£ #define Go_F(l) RotateMotorEx(OUT_BC,25,Rotary(l),0,true,true); #define Go_B(l) RotateMotorEx(OUT_BC,-25,Rotary(l),0,true,true); **¥µ¥Ö¥ë¡¼¥Á¥ó [#k59d0a91] ¤³¤ì¤Ï¡¢»æ¥³¥Ã¥×¤òǧ¼±¤·»ý¤Á¹ç¾å¤²¡¢½êÄê¤Î°ÌÃ֤˻ý¤Ã¤Æ¤¤¤¯¥×¥í¥°¥é¥à¡£ sub Papercop() ¡¡{ SetSensorLowspeed(S1); int n=0;//»æ¥³¥Ã¥×¤òǧ¼±¤·¤¿²ó¿ô while(n<1){ if (SensorUS(S1)<=10){//»æ¥³¥Ã¥×¤È¤Îµ÷Î¥¤¬10cm°ÊÆâ¤Ê¤é Go_F(5);//»æ¥³¥Ã¥×¤ò¼è¤ê¤Ë¹Ô¤¯ Tozire; Turn_r; OnRev(OUT_B,50); Wait(100);//¥µ¡¼¥¯¥ë¤Þ¤Çľ¿Ê¤Ç¤¤ë¤è¤¦Ä´Àá Go_F(10);//¥µ¡¼¥¯¥ë¤Ë¸þ¤«¤¦ Hirake; Go_B(10);//ÃÏÅÀ¤ËÌá¤ë OnRev(OUT_C,50); Wait(200);//PÃÏÅÀ¤Þ¤Çľ¿Ê¤Ç¤¤ë¤è¤¦Ä´Àá Turn_l; OnFwd(OUT_B,50); Wait(100); Off(OUT_B);//PÃÏÅÀ¤Þ¤Çľ¿Ê¤Ç¤¤ë¤è¤¦Ä´Àá Go_B(5);//¥¹¥ì¡¼¥Ö¤¬ÃÖ¤¤¤¿»æ¥³¥Ã¥×¤Ë¤Ö¤Ä¤«¤é¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤¿¤á¤Ë²¼¤¬¤ë n++;//ǧ¼±²ó¿ô¤òÁý¤ä¤¹ Off(OUT_BC);//ÂÔµ¡ }else{ OnFwd(OUT_BC,50); } } n=0; } #define CONN 1 #define Boot 11 **Main´Ø¿ô [#qc2c8b7d] task main() { Go_F(25);//RÃÏÅÀ¤Þ¤Ç¿Ê¤à Turn_r;//RÃÏÅÀ±¦Àû²ó OnFwd(OUT_C,50); Wait(100); Off(OUT_C);//Àþ¤Ë±è¤Ã¤Æ¿Ê¤á¤ë¤è¤¦Ä´Àá Go_F(15); OnRev(OUT_C,50); Wait(100); Off(OUT_C); Turn_l; Off(OUT_BC); OnFwd(OUT_B,50); Wait(100); Off(OUT_B); Go_B(8); Off(OUT_BC); int x=0;//¥á¥Ã¥»¡¼¥¸¤¬Á÷¤é¤ì¤Æ¤¤¿²ó¿ô while(x<6){//»æ¥³¥Ã¥×¤Ï6¸Ä¤¢¤ë¤¿¤á6²ó·«¤êÊÖ¤¹ int msg;//¼õ¤±¼è¤Ã¤¿Ãͤò³ÊǼ¤¹¤ëÊÑ¿ô ReceiveRemoteNumber(MAILBOX1,true,msg)//MAILBOX1¤ÎÃͤò¼õ¤±¼è¤êmsg¤Ë³ÊǼ //true¤ò»ØÄꤹ¤ë¤È¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤¬¶õ¤Ë if(msg == Boot){//¤â¤·¥á¥Ã¥»¡¼¥¸¤¬Á÷¤é¤ì¤Æ¤¤¿¤é Wait(1000);//¥¹¥ì¡¼¥Ö¤È¤Ö¤Ä¤«¤é¤Ê¤¤¤è¤¦¤ËÂÔµ¡¤·¤Æ Papercop(); x++;//¥á¥Ã¥»¡¼¥¸¤¬Á÷¤é¤ì¤Æ¤¤¿²ó¿ô¤òÁý¤ä¤¹ }else{ Off(OUT_BC);//Á÷¤é¤ì¤Æ¤³¤Ê¤¤¸Â¤ê¤ÏÂÔµ¡ } } } *·ë²Ì [#l6f3d894] »ä¤¿¤Á¤ÎÈɤϻ楳¥Ã¥×¤ò°ì¤Ä¤â±¿¤Ö¤³¤È¤¬½ÐÍ褤ޤ»¤ó¤Ç¤·¤¿¡£ °ì²óÌܤϥ¹¥ì¡¼¥Ö¦¤Î¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î¥È¥é¥Ö¥ë¤Ç»æ¥³¥Ã¥×¤ò±¿¤Ö¤³¤È¤¬½ÐÍ褺¡¢ Æó²óÌܤϥޥ¹¥¿¡¼Â¦¤Î¥¢¡¼¥à¤Î¥È¥é¥Ö¥ë¤Ç»æ¥³¥Ã¥×¤ò±¿¤Ö¤³¤È¤¬½ÐÍè¤Þ¤»¤ó¤Ç¤·¤¿¡£ ¥í¥Ü¥³¥ó¤Î½ç°Ì¤ÏÁ´ÂΤÇ3°Ì¤Ç¤·¤¿¡£ ÀµÄ¾¡¢¤³¤³¤Þ¤Ç¤¤¤¤·ë²Ì¤¬¼è¤ì¤ë¤È»×¤Ã¤Æ¤¤¤Ê¤«¤Ã¤¿¤Î¤Ç ´ò¤·¤«¤Ã¤¿¤Ç¤¹¡£¤Ç¤â¡¢°ì¤Ä¤â±¿¤Ù¤Ê¤«¤Ã¤¿¤³¤È¤¬²ù¤·¤¹¤®¤Æ ½ª¤ï¤Ã¤¿Ä¾¸å¤Ï´ò¤·¤µ¤ò´¶¤¸¤ë¤³¤È¤¬½ÐÍè¤Þ¤»¤ó¤Ç¤·¤¿¡£ ¤·¤«¤·¡¢µ»½ÑÅÀ¤Ç¤Ï°ì°Ì¡¢¥í¥Ü¥³¥ó¤Ç¤Ï»°°Ì¤ò¼è¤ì¤Þ¤·¤¿¡£ *¹Í»¡ [#a7316079] »ä¤¿¤Á¤¬»æ¥³¥Ã¥×¤ò±¿¤Ù¤Ê¤«¤Ã¤¿°ìÈÖ¤ÎÍýͳ¤Ï¡¢Á´°÷¤Ç½¸¤Þ¤Ã¤Æºî¶È¤ò¤¹¤ë »þ´Ö¤¬¤Û¤È¤ó¤É¤Ê¤«¤Ã¤¿¤³¤È¤À¤È»×¤¤¤Þ¤¹¡£¥Æ¥¹¥È´ü´Ö¤È¤¤¤¦¤³¤È¤â¤¢¤ê¤Þ¤¹¤¬ ¤â¤¦¾¯¤·»þ´Ö¤ò¼è¤Ã¤Æ¹ç¤ï¤»¤ë»þ´Ö¤òºî¤ì¤ÐÎɤ«¤Ã¤¿¤È»×¤¤¤Þ¤¹¡£ *²ÝÂꣳ¤Î´¶ÁÛ¡¦Á´ÂΤòÄ̤·¤Æ¤Î´¶ÁÛ [#ue036a63] ËÜÈ֤Ǥϰì¤Ä¤â±¿¤Ö¤³¤È¤¬½ÐÍè¤Þ¤»¤ó¤Ç¤·¤¿¤¬¡¢¥ê¥Ï¡¼¥µ¥ë¤Î»þ¤ËÆóÃÊÀѤळ¤È¤¬½ÐÍ褿 »þ¤Ï¤â¤Î¤¹¤´¤¯´ò¤·¤«¤Ã¤¿¤Ç¤¹¡£¤¢¤Î½Ö´Ö¤Ïº£¤Þ¤Ç´èÄ¥¤Ã¤Æ¤¤ÆÎɤ«¤Ã¤¿¤È»×¤ï¤»¤Æ¤¯¤ì¤¿ ½Ö´Ö¤Ç¤·¤¿¡£¤ä¤Ã¤Æ¤¤¤ë»þ¤Ï¶ì¤·¤¯¤ÆÅÓÃæ¤Ç²¿²ó¤âÄü¤á¤¿¤¤¤È»×¤¤¤Þ¤·¤¿¤¬¡¢ºÇ¸å¤Þ¤Ç ¤ä¤Ã¤ÆËÜÅö¤Ë¤è¤«¤Ã¤¿¤Ç¤¹¡£ ¤¹¤Ù¤Æ¤Î²ÝÂê¤ò½ª¤¨¤Æ¡¢²¿²ó¤â¸À¤Ã¤Æ¤¤¤Þ¤¹¤¬¶ì¤·¤¤¤³¤È¤¬¤¿¤¯¤µ¤ó¤¢¤ê¤Þ¤·¤¿¡£ »ä¤¿¤Á¤ÎÈɤϲÝÂê1¤Î»þ¤Ë1¿Í¼õ¹Ö¤ò¤ä¤á¤Æ¤·¤Þ¤¤¡¢¤º¤Ã¤ÈÆó¿Í¤Ç²ÝÂê¤ò¤ä¤Ã¤Æ¤¤Þ¤·¤¿¡£ Æó¿Í¤Ç¤ä¤Ã¤Æ¤¤¤ë»þ¡¢¡Ö¤â¤¦°ì¿Í¤¤¤ì¤Ðºî¶È¤¬³Ú¤Ë¤Ê¤ë¤Î¤Ë¡×¤È²¿²ó¤â»×¤¤¤Þ¤·¤¿¡£ ¤·¤«¤·¡¢ÂçÊѤǤ·¤¿¤¬Æó¿Í¤ÇºÇ¸å¤Þ¤Ç¤ä¤êÀÚ¤ì¤ÆËÜÅö¤Ë¤è¤«¤Ã¤¿¤Ç¤¹¡£ ¤³¤Î¹ÖµÁ¤Ç²þ¤á¤Æ¶¨ÎϤ¹¤ë¤³¤È¤ÎÂçÀÚ¤µ¤ò³Ø¤Ö¤³¤È¤¬½ÐÍè¤Þ¤·¤¿¡£