Ìܼ¡
#contents
¡¡¡¡
*²ÝÂê2 [#e5271ba3]
¥³¡¼¥¹¤Ë±è¤Ã¤Æ¥í¥Ü¥Ã¥È¤òÁö¤é¤»¤ë¡£

**¥³¡¼¥¹ [#e89dea7e]
#ref(./2017a-mission2.png,75%,¥³¡¼¥¹)
-¡¦EÃÏÅÀ±¦ÀÞ¥³¡¼¥¹
--¡¡¡¡E±¦ÀÞ(SOUND_UP)
--¡¡¡¡P°ì»þÄä»ß(SOUND_DOWN)¡õº¸ÀÞ
--¡¡¡¡Q(SOUND_UP)¡õľ¿Ê
--¡¡¡¡R(SOUND_UP)¡õº¸ÀÞ
--¡¡¡¡T°ì»þÄä»ß(SOUND_DOWN)¡õľ¿Ê
--¡¡¡¡T°ì»þÄä»ß(SOUND_DOWN)¡õľ¿Ê
--¡¡¡¡H(SOUND_UP)
--¡¡¡¡G(SOUND_UP)¡¡
--¡¡¡¡S°ì»þÄä»ß(SOUND_DOWN)¡õº¸ÀÞ
--¡¡¡¡Pľ¿Ê(SOUND_UP)
--¡¡¡¡Qº¸ÀÞ(SOUND_UP)
--¡¡¡¡F(SOUND_UP)
--¡¡¡¡Eľ¿Ê
--¡¡¡¡AÄä»ß(SOUND_DOWN)
 
*¥í¥Ü¥Ã¥È¤ÎÀâÌÀ [#t824368f]
**¥í¥Ü¥Ã¥ÈÁ´ÂÎ [#mab73167]
¥¿¥¤¥ä¤È¥»¥ó¥µ¡¼¤Îµ÷Î¥¤ò¤Ç¤­¤ë¤À¤±¶á¤Å¤±¤é¤ì¤ë¤è¤¦¤Ë¥³¥ó¥Ñ¥¯¥È¤Ë¤·¤è¤¦¤È¤·¤Þ¤·¤¿¤¬½Ä¤ËÂ礭¤¯¤Ê¤êÉԳʹ¥¤Ë¤Ï¤Ê¤ê¤Þ¤·¤¿¤¬¡¢ÆÃ¤ËÌäÂê¤Ï¤Ê¤«¤Ã¤¿¤Î¤Ç¤½¤Î¤Þ¤Þ¤Ë¤·¤Þ¤·¤¿¡£
#ref(./unna1.jpg,75%,Á´ÂÎ)unna1.jpg
¤Þ¤¿²£°Üư¤¬Â¿¤¤¤È¤¤¤¦¤³¤È¤ÇË໤¤ò¸º¤é¤¹¤¿¤á¸åÎØ¤ò¤Ê¤¯¤·³ê¤é¤»¤ë·Á¤Ë¤·¤Þ¤·¤¿¡£
#ref(./usiro1.jpg,75%,¸å¤í)
*¥×¥í¥°¥é¥à [#pa7f0a65]
ºÇ½é¤ËºÙ¤«¤¤Éôʬ¤ÎÄêµÁ¤ò¹Ô¤Ã¤Æ¤«¤é¥×¥í¥°¥é¥à¤ò¤¯¤ß¤Þ¤·¤¿¡£
¹õÀþ¾å¤Ë¥»¥ó¥µ¡¼¤¬È¿±þ¤¹¤ë»þ´Ö¤ÎŤµ¤«¤é¸òº¹ÅÀ¤ä£Ô»úÏ©¤òȽÃǤ·¤¿¾å¤Ç¸òº¹ÅÀ¤È£Ô»úÏ©¤ò¥«¥¦¥ó¥È¤·º£²¿ÈÖÌܤθòº¹ÅÀ¤«£Ô»úÏ©¤Ê¤Î¤«¤òȽÃǤ·¤Þ¤·¤¿¡£

**¥×¥í¥°¥é¥àËÜÂÎ [#n47d8fad]
 # define TMAX 29
 # define forward OnFwd(OUT_AC);
 # define back OnRev(OUT_AC);
 # define t_left OnRev(OUT_A);OnFwd(OUT_C); //º¸Àû²ó
 # define turn_left Off(OUT_A);OnFwd(OUT_C);     //º¸²óž
 # define t_right OnFwd(OUT_A);OnRev(OUT_C); //±¦Àû²ó
 # define turn_right OnFwd(OUT_A);Off(OUT_C);    //±¦²óž
 # define stop(t) Off(OUT_AC);Wait(t);
 # define power(s) SetPower(OUT_AC,s);
 # define KOUON PlaySound(SOUND_UP);
 # define TEION PlaySound(SOUND_DOWN);

¤³¤³¤Þ¤Ç¤¬ÄêµÁ
¾ì½ê¤Ë¤è¤Ã¤Æ¿ôÃͤ¬°ã¤Ã¤¿¤ê¤·¤Æ¼ºÇÔ¤¬Â¿È¯¤·¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¤¬¤Ê¤ó¤È¤«Ä´À°¤·¤Þ¤·¤¿¡£


 int n=0;
 sub right(){
     while(FastTimer(0)<TMAX){
        if(SENSOR_2<42){
         OnFwd(OUT_A);OnRev(OUT_C);
        }else if(SENSOR_2<47){
         OnFwd(OUT_A);Off(OUT_C);
        }else if(SENSOR_2<52){
         OnFwd(OUT_A);OnFwd(OUT_C);
        }else if(SENSOR_2<55){
         Off(OUT_A);OnFwd(OUT_C);
        } else {
         OnRev(OUT_A);OnFwd(OUT_C);
         }
        if(SENSOR_2>42){
               ClearTimer(0);
         }
       }
      n++;
 }
 sub left(){
     while(FastTimer(0)<TMAX){
        if(SENSOR_2<42){
    OnRev(OUT_A);OnFwd(OUT_C);
   }else if(SENSOR_2<47){
    Off(OUT_A);OnFwd(OUT_C);
   }else if(SENSOR_2<52){
    OnFwd(OUT_A);OnFwd(OUT_C);
   }else if(SENSOR_2<55){
    OnFwd(OUT_A);Off(OUT_C);
   } else {
    OnFwd(OUT_A);OnRev(OUT_C);
   }
   if(SENSOR_2>40){
           ClearTimer(0);
   }
  } 
  n++;
 } 

¥µ¥Ö¤ÇÀþ¤ÎÇ»¤µ¤Ë¤è¤Ã¤Æ¶Ê¤¬¤êÊý¤òÊѤ¨¤ëº¸±¦¤ÎÄêµÁÉÕ¤ò¤·¤Þ¤·¤¿¡£

¤³¤³¤«¤é¤¬¥á¥¤¥ó
 task main(){
       power(0);
       SetSensor(SENSOR_2,SENSOR_LIGHT);
       ClearTimer(0);
       while(n<=13){

­¡±¦ÀÞ
°ì¤ÄÌܤÎT»úÏ©¤òǧ¼±¤·¤¿¸å¼¡¤Î¸òº¹ÅÀ¤Çº¸ÀÞ¤ò¤¹¤ë¤Î¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¤òº¸Â¦¤ËÊѹ¹¤·¤Þ¤¹¡£
           if(n==0){       //T»úÏ©
              right();
              KOUON;
              t_left;Wait(10);
              forward;Wait(40);        //0.1ÉÃÄä»ß¤·¤Æ0.4ÉÃÁ°¿Ê¡¡º¸¤Ø
              ClearTimer(0);     //¥¿¥¤¥Þ¡¼¥ê¥»¥Ã¥È
          }

­¢°ì»þÄä»ß¤Î¤Áº¸ÀÞ
T»úÏ©¤òǧ¼±¤µ¤»¤Æº¸¼þ¤ê¤Ë¿Ê¤Þ¤»¤ë¤Î¤Ç¤¹¤¬¥»¥ó¥µ¡¼¤¬Àþ¤ò±Û¤¨¤Æ¤¢¤é¤ÌÊý¸þ¤Ë¿Ê¤à¤³¤È¤¬Â¿È¯¤·¤¿¡£

              else if(n==1){
              left();
              back;Wait(20);
              stop(80);
              TEION;
              t_left;Wait(30);
              forward;Wait(50);
              ClearTimer(0);
           }

­£Ä¾¿Ê
T»úÏ©¤òǧ¼±¤·¤¿¤¢¤È¤Ç¡¢º¸ÀÞ¤»¤ºÄ¾¿Ê¤µ¤»¤ë¡£
              else if(n==2){
              left();
              KOUON;
              t_right;Wait(15);
              forward;Wait(50);
              ClearTimer(0);
           }

­¤º¸ÀÞ
T»úÏ©¤òǧ¼±¤·¡¢±¦Â¦¥é¥¤¥ó¤Ø°ÜưºÇ½ª¤Î±ß¾õ¸òº¹ÅÀ¤Î¤¿¤á¤Ë¡¢¤³¤Î»þ¤Ë°Üư¡£¤³¤Î»þÅÀ¤Ç°Üư¤¹¤ë¤³¤È¤Ç¼¡¤Î±ß¤â³Ú¤Ë¤Ê¤Ã¤¿¡£


              else if(n==3){
              left();
              KOUON;
              t_right;Wait(15);
              forward;Wait(50);
              ClearTimer(0);
           }

­¥°ì»þÄä»ß¤Î¤Áľ¿Ê
­¥¡¢­¦¤ÏƱ¤¸
±¦Â¦¤Ë°Üư¤¹¤ë¤³¤È¤Ç¾¯¤·³Ú¤Ë¤Ê¤ê¤Þ¤·¤¿¡£


              else if(n==4){
              right();
              TEION;
              t_left;Wait(25);
              stop(80);
              forward;Wait(50);
              ClearTimer(0);
           }

­¦°ì»þÄä»ß¤Î¤Áľ¿Ê

              else if(n==5){
              right();
              t_left;Wait(25);
              stop(80);
              TEION;
              forward;Wait(50);
              ClearTimer(0);
           }

­§±¦ÀÞ
­§¡¢­¨¤ÏÀþ¤Ë±è¤Ã¤Æ°Üư¤¹¤ë¤À¤±¤Ç¤·¤¿¤Î¤ÇÆÃ¤ËÆñ¤·¤¯¤¢¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡£


              else if(n==6){
              right();
              KOUON;
              t_right;Wait(50);
              forward;Wait(50);
              turn_right;Wait(15);
              ClearTimer(0);
           }

­¨µÞ¥«¡¼¥Ö

              else if(n==7){
              right();
              forward;Wait(15);
              t_right;Wait(70);
              forward;Wait(50);
              turn_right;Wait(10);
              t_right;Wait(40);
              ClearTimer(0);
            }

­©±¦ÀÞ
­©¡¢­ª¡¢­«¤Ï°ì²óÌܤα߾õ¤ÈƱ¤¸Æ°¤­¤Ç¤·¤¿¤Î¤Ç¡¢»÷¤¿¤è¤¦¤Ê¥ß¥¹¤âϢȯ¤·¤¿¡£

               else if(n==8){
              right();
              KOUON;
              t_left;Wait(10);
              forward;Wait(40);
              ClearTimer(0);
            }

­ª°ì»þÄä»ß¤Î¤Áº¸ÀÞ

              else if(n==9){
              left();
              back;Wait(20);
              stop(80);
              TEION;
              t_left;Wait(30);
              forward;Wait(50);
              ClearTimer(0);
            }

­«Ä¾¿Ê

              else if(n==10){
              left();
              KOUON;
              t_right;Wait(15);
              forward;Wait(50);
              ClearTimer(0);
            }

­¬º¸ÀÞ
¤³¤³¤«¤é¤Ï¤Û¤Üľ¿Ê¤À¤Ã¤¿¤Î¤ÇÌäÂê¤Ï¤Ê¤·

              else if(n==11){
              left();
              KOUON;
              t_right;Wait(15);
              forward;Wait(50);
              ClearTimer(0);
            }


­­±¦ÀÞ

              else if(n==12){
              right();
              KOUON;
              t_right;Wait(50);
              forward;Wait(40);
              turn_right;Wait(10);
              ClearTimer(0);
            }


­®Ä¾¿Ê

              else if(n==13){
              right();
              KOUON;
              t_left;Wait(25);
              forward;Wait(250);
              }
      Off(OUT_AC);
     }

¥µ¥Ö¤Ê¤É¤ÇÄêµÁ¤·¤¿ÆâÍÆ¤ò¥á¥¤¥ó¤Ç¸Æ¤Óµ¯¤³¤¹·Á¤Ê¤Î¤Ç¥á¥¤¥ó¥¿¥¹¥¯¤Ï¾¯¤·Ã»¤¯¤Ç¤­¤¿¤«¤Ê¤È»×¤¤¤Þ¤¹¡£¤Þ¤¿¶Ê¤¬¤ê³Ñ¤äT»úÏ©¤ò¥«¥¦¥ó¥È¤·¸½ºßÃϤò¿äÄꤵ¤»¤Æ¤¤¤¿¤Î¤Ç¡¢¥«¥¦¥ó¥È¤·¤Ê¤«¤Ã¤¿¤È¤­¤Ë¤¹¤°¤Ë˽Áö¤·¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¡£ 

**¤Þ¤È¤á [#kc5b400b]
¶Ê¤¬¤ê³Ñ¤äT»úÏ©¤òǧ¼±¤·¥«¥¦¥ó¥È¤¹¤ë¤³¤È¤Ç°ÌÃÖ¤ò³Îǧ¤¹¤ë¤è¤¦¤Ë¤·¤Þ¤·¤¿¤¬¡¢Ç§¼±¤·¤Æ¤¯¤ì¤Ê¤¤¤³¤È¤â¤¢¤ê¾å¼ê¤¯¤¤¤«¤Ê¤¤»þ¤¬¤¢¤ê¤Þ¤·¤¿¡£

*´¶ÁÛ [#b7496b56]
º£²óÀþ¤ÎÇ»¤µ¤ä¹õ¤¤Éôʬ¤ËÈ¿±þ¤¹¤ë»þ´Ö¤Ê¤ÉºÙ¤«¤¤·×¬¤ò¤·¤¿¤¦¤¨¤Ç¡¢¥×¥í¥°¥é¥à¤òÁȤàɬÍפ¬¤¢¤ê¤Þ¤·¤¿¤¬¤½¤Î»þ¤ËÀµ³Î¤Ê»þ´Ö¤Ê¤É¤ò·×¬¤Ç¤­¤Ê¤Ã¤«¤¿¤ê¾ì½ê¤Ë¤è¤Ã¤Æ°Û¤Ê¤Ã¤¿¤ê¤·¤Æ¤¤¤Æ¤Ê¤«¤Ê¤«¾å¼ê¤¯¤¤¤«¤Ê¤«¤Ã¤¿¡£¤â¤¦¾¯¤·¤¸¤Ã¤¯¤ê¤È¿§¤ó¤Ê¾ì½ê¤Ç·×¬¤·¤¿¤¦¤¨¤ÇºÙ¤«¤¯¥×¥í¥°¥é¥à¤¹¤ì¤Ð¤è¤«¤Ã¤¿¤È»×¤¤¤Þ¤¹¡£

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