[[2015a/Member]]
#contents
*¥í¥Ü¥Ã¥È¤Ë¤Ä¤¤¤Æ [#dcfecd33]
²ÝÂê2¤Ç»È¤Ã¤¿¥í¥Ü¥Ã¥È¤Î¥¢¡¼¥à¤Î¾åÉô¤ËͲ»ÇÈ¥»¥ó¥µ¡¼¤ò¼è¤êÉÕ¤±¤Þ¤·¤¿¡£
#ref(./DSC_0138.JPG,20%);
*¥×¥í¥°¥é¥ß¥ó¥°¤Ë¤Ä¤¤¤Æ [#wd1eb43d]





 #define TURN OnFwd(OUT_B,20);OnRev(OUT_C,20);
 #define TURN_TIME 7000
 #define GO OnFwd(OUT_BC,50);
 #define SHOOT_DIST 25
 #define SHOOT OnRev(OUT_BC,80);Wait(500);OnFwd(OUT_BC,80);OnFwd(OUT_A,80);Wait(500);
 #define STOP Off(OUT_BC);Wait(1000);
 task main()
 {
   SetSensorLowspeed(S3);
   int dist_mini=100; 
   while(true) {
   
     long t = CurrentTick();
     while(CurrentTick()-t <= TURN_TIME) {
       TURN;
       if (SensorUS(S3) < dist_mini) {
        dist_mini=SensorUS(S3);
        } 
      }
         TURN;
         if (SensorUS(S3) < dist_mini) {
             dist_mini=SensorUS(S3);
         } 
     }
     STOP;  
     TURN;
     until(SensorUS(S3) == dist_mini);
     GO;
     until(SensorUS(S3) <= SHOOT_DIST);
     STOP; 
     SHOOT;
     Off(OUT_BC);
   } 
 }


º£²óºî¤Ã¤¿¥×¥í¥°¥é¥ß¥ó¥°¤Ï¡¢¤À¤¤¤¿¤¤°ì²óž¤¹¤ë´Ö¤Ë¥«¥ó¤È¤Îµ÷Î¥¤òµ­Ï¿¤·¤Æ¡¢¤½¤Î¸å¤Ç¥«¥ó¤ÎÀµÌ̤ò¸þ¤­¡¢Àܶᤷ¤Æ¥Ü¡¼¥ë¤ò¤Ö¤Ä¤±¤ë¤È¤¤¤¦¤â¤Î¤Ç¤¹¡£

¤À¤¤¤¿¤¤°ì²óž¤¹¤ë´Ö¤Ë¡¢¡Ödist_mini¡×¤Ç100¤ÈÄêµÁ¤·¤¿²¾¤ÎºÇ¾®Ãͤè¤ê¤â¾®¤µ¤¤ÃͤòͲ»ÇÈ¥»¥ó¥µ¡¼¤Ç¸¡ÃΤ·¤¿¤È¤­¤Ë¡¢²¾¤ÎºÇ¾®Ãͤò¤½¤ÎÃͤ˹¹¿·¤·¤Þ¤¹¡£Á´Êý¸þ¤òͲ»ÇÈ¥»¥ó¥µ¡¼¤ÇÄ´ºº¤¹¤ë¤¿¤á¤Ë¡¢²óž¤¹¤ë»þ´Ö¤ò¡ÖTURN_TIME¡×¤Ç7000¤È¾¯¤·Ä¹¤á¤ËÀßÄꤷ¤Þ¤·¤¿¡£
¤½¤Î¸å¡¢²óž¤¹¤ë´Ö¤Ë²¾¤ÎºÇ¾®Ãͤ«¤é¹¹¿·¤·¤¿ºÇ¾®Ã͡ʥ«¥ó¤È¤Îµ÷Î¥¡Ë¤òͲ»ÇÈ¥»¥ó¥µ¡¼¤¬¤â¤¦°ìÅÙ¸¡ÃΤ¹¤ë¤Þ¤Ç²óž¤·¡¢¥«¥ó¤ÎÊý¤ò¸þ¤­¤Þ¤¹¡£¤½¤Î¤Þ¤Þ¥«¥ó¤È¤Îµ÷Î¥¤¬25­Ñ¤Ë¤Ê¤ë¤Þ¤Çľ¿Ê¤·¤Þ¤¹¡£
¤½¤Î¸å¡¢¡ÖSHOOT¡×¤Î¥×¥í¥°¥é¥à¤Ç¥Ü¡¼¥ë¤ò¥«¥ó¤Ë¤Ö¤Ä¤±¤Þ¤¹¡£

*´¶ÁÛ [#y4bd9473]

¥í¥Ü¥Ã¥ÈËÜÂΤ˴ؤ·¤Æ¤Ï¡¢²ÝÂê2¤Î¥í¥Ü¥Ã¥È¤Ë¤¿¤Þ¤¿¤ÞͲ»ÇÈ¥»¥ó¥µ¡¼¤ò´Êñ¤ËÉÕ¤±¤ë¤³¤È¤¬¤Ç¤­¤¿¤Î¤Ç¡¢Îɤ«¤Ã¤¿¤Ç¤¹¡£
¥×¥í¥°¥é¥ß¥ó¥°¤Ë´Ø¤·¤Æ¤Ï¡¢¤È¤Æ¤âñ½ã¤Ê¥×¥í¥°¥é¥à¤Ë¤Ê¤ê¤Þ¤·¤¿¤¬¡¢Àµ³Î¤Ë°ì²óž¤¹¤ëɬÍפΤʤ¤¤â¤Î¤òºî¤ë¤³¤È¤¬¤Ç¤­¤ÆËþ­¤·¤Æ¤¤¤Þ¤¹¡£³Î¼ÂÀ­¤ò¾å¤²¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à¤¬»×¤¤¤Ä¤«¤Ê¤«¤Ã¤¿¤Î¤¬»Äǰ¤Ç¤·¤¿¡£

¥È¥Ã¥×   ÊÔ½¸ º¹Ê¬ ÍúÎò źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS