Ìܼ¡
#contents

*²ÝÂê [#ra7beac2]
º£²ó¤Î²ÝÂê¤Ï¥Ü¡¼¥ë¤ò±¿È¤¹¤ë¥í¥Ü¥Ã¥È¤òºî¤ë¤³¤È¤Ç¤¢¤ë¡£
ÀĤÈÀ֤Υܡ¼¥ë¤ò±¿È¤·¤Æ¡¢¤½¤ì¤¾¤ì½êÄê¤Î350ml´Ì¤Î¾å¤Ë¾è¤»¤ë¡£

&ref(2018b/Member/Yoshi/Mission3/¥í¥Ü¥Æ¥£¥¯¥¹²ÝÂê3.png,100%,´°À®);

¥Õ¥£¡¼¥ë¥É¤ÎÀâÌÀ~
     ◦¥Õ¥£¡¼¥ë¥É¤Ï²ÝÂê2¤Ç»ÈÍѤ·¤¿»æ¤ò»ÈÍѤ¹¤ë¡£~
     ◦350ml´Ì(Ã椬Æþ¤Ã¤Æ¤¤¤Æ¤â¶õ¤Ç¤è¤¤)¤ÏµÕ¤µ¤Þ¤Ë¤·¤Æ»È¤¤¡¢¥í¥Ü¥Ã¥È¤Î¥¹¥¿¡¼¥Èľ¸å¤Ë¥µ¥¤¥³¥í¤ò¿¶¤Ã¤Æ½Ð¤¿ÌܤÎÈÖ¹æ¤Î°ÌÃÖ¤ËÃÖ¤¯¡£~
     ◦¤½¤ÎÈÖ¹æ¤Î¼¡¤ÎÈÖ¹æ¤Î¤È¤³¤í¤Ë¤â¥À¥ß¡¼¤Î´Ì¤òÃÖ¤¯¤³¤È¤¬¤Ç¤­¤ë¡£¤¿¤À¤·6¤ÎÌܤ¬½Ð¤¿¾ì¹ç¤Ï6¤Î°ÌÃÖ¤È25cm°Ê¾åÎ¥¤ì¤Æ¤¤¤Ê¤¤¾ì½ê¤Ê¤é¤É¤³¤Ë~
      ÃÖ¤¤¤Æ¤â¤è¤¤¤â¤Î¤È¤¹¤ë¡£µ÷Î¥¤Ï´Ì¤È´Ì¤Î¤â¤Ã¤È¤â¶á¤¤Éôʬ¤Ç¬¤ë¡£~
     ◦¶õ¤­´Ì¤Ë¤Ï¿§¤ò¤Ä¤±¤¿¤êʸ»ú¤äµ­¹æ¤ò½ñ¤¤¤Æ¤â¤è¤¤¡£¤¢¤ë¤¤¤Ï¼þ°Ï¤Ë»æ¤òÄ¥¤Ã¤Æ¤â¤è¤¤¡£~
     ◦ÀÖ¤ÈÀĤΥܡ¼¥ë¤Ï¡¢¿Þ¤Î¤è¤¦¤Ë½êÄê¤Î¾ì½ê¤ËÃÖ¤¤¤Æ¤ª¤¯¡£¤½¤ÎºÝ¡¢¥­¥Ã¥È¤Ë´Þ¤Þ¤ì¤Ê¤¤¾®¤µ¤ÊÎØ¥´¥à¤ò»ÈÍѤ¹¤ë¤â¤Î¤È¤¹¤ë¡£~

**¥ë¡¼¥ë[#df79f5bf]
´ðËܥ롼¥ë ~
   ◦¶¥µ»»þ´Ö¤Ï¿³È½¤¬Â³¹ÔÉÔǽ¤ÈȽÃǤ¹¤ë¤Þ¤Ç¡¢¤¢¤ë¤¤¤Ï¥ê¥¿¥¤¥¢¤¹¤ë¤Þ¤Ç¡£~
   ◦¿Þ¤ÎXÃÏÅÀ¤Þ¤¿¤Ï¡Ê¤ª¤è¤Ó¡ËYÃÏÅÀ¤«¤é¥¹¥¿¡¼¥È¤¹¤ë¡£¤¿¤À¤·ÀÜÃϤ·¤Æ¤¤¤ëÉôʬ¤Ï¤½¤ì¤¾¤ì¤ÎÎΰèÆâ¤Ë¼ý¤Þ¤ë¤â¤Î¤È¤¹¤ë¡ÊÀþ¾å¤ÏOK¡Ë¡£¾å¶õÉôʬ¤ÏÎΰ褫¤é~
    ¤Ï¤ß½Ð¤·¤Æ¤¤¤Æ¤â¤è¤¤¡£~
   ◦ÀÖ¤¤¥Ü¡¼¥ë¤ò¿Þ¤Î¥Ô¥ó¥¯¤Î¤¤¤º¤ì¤«¤ËÃÖ¤¤¤¿´Ì¤Ë¡¢ÀĤ¤¥Ü¡¼¥ë¤ò¿Þ¤Î¿å¿§¤Î¤¤¤º¤ì¤«¤ËÃÖ¤¤¤¿´Ì¤Ë¡¢¤½¤ì¤¾¤ì¾è¤»¤ë¡£~
   ◦³«»Ï¤Î¹ç¿Þ¤«¤é£µÉðÊÆâ¤Ë¥¹¥¿¡¼¥È¥Ü¥¿¥ó¤ò²¡¤¹ºî¶È¤ò´°Î»¤¹¤ë¤³¤È¡£~
   ◦¶¥µ»¤¬½ªÎ»¤¹¤ë¤Þ¤Ç¡¢¥í¥Ü¥Ã¥È¤Ë¿¨¤Ã¤¿¤ê¿Í´Ö¤¬±ó³Ö¤ÇÁàºî¤·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£~
   ◦ÅÓÃæ¤Ç¤¦¤Þ¤¯Æ°¤«¤Ê¤¯¤Ê¤Ã¤¿¾ì¹ç¡¢£±²ó¸Â¤êºÆ¥¹¥¿¡¼¥È¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡ÊºÆ¥¹¥¿¡¼¥È¤ÎºÝ¤ËÊÌ¥×¥í¥°¥é¥à¤Çµ¯Æ°¤·¤Æ¤è¤¤¡Ë¡£~

'' ´ðËÜÆÀÅÀ¤Î·×»»ÊýË¡ '' ~
´ðËÜÆÀÅÀ¤Î·×»»ÊýË¡ ~
   ◦¥Ü¡¼¥ë¤ò°ì¤Ä¾è¤»¤ì¤Ð¤½¤ì¤¾¤ì10ÅÀ¡¢Æó¤Ä¤È¤â¾è¤»¤ì¤Ð¥Ü¡¼¥Ê¥¹ÅÀ¤È¤·¤Æ¤µ¤é¤Ë10ÅÀ¡£~
   ◦¥À¥ß¡¼¤Î´Ì¤òÀßÃÖ¤·¤¿¾å¤Ç¡¢Àµ¤·¤¤´Ì¤Ë¾è¤»¤ì¤Ð¡¢¤½¤ì¤¾¤ì¤µ¤é¤Ë6ÅÀ²ÃÅÀ¤¹¤ë¡£~
   ◦¥Ü¡¼¥ë¤òÌÜŪ¤Î´Ì¤ËÅö¤Æ¤ë¤³¤È¤¬¤Ç¤­¤ì¤Ð¡¢¤½¤ì¤¾¤ì4ÅÀ¡£~
   ◦¥Ü¡¼¥ë¤òƱ¤¸ÎΰèÆâ¤Î´Ö°ã¤Ã¤¿´Ì¤Ë¾è¤»¤¿¾ì¹ç¤Ï¡¢¤½¤ì¤¾¤ì6ÅÀ¡£~
   ◦¥Ü¡¼¥ë¤òƱ¤¸ÎΰèÆâ¤Î´Ö°ã¤Ã¤¿´Ì¤ËÅö¤Æ¤¿¾ì¹ç¤Ï¡¢¤½¤ì¤¾¤ì2ÅÀ¡£~
   ◦¥Ü¡¼¥ë¤ò°ã¤¦ÎΰèÆâ¤Î´Ì¤Ë¾è¤»¤¿¾ì¹ç¤Ï¡¢¤½¤ì¤¾¤ì2ÅÀ¡£~
   ◦¥Ü¡¼¥ë¤ò°ã¤¦ÎΰèÆâ¤Î´Ì¤ËÅö¤Æ¤¿¾ì¹ç¤Ï¡¢0ÅÀ¡£~
   ◦ÌÜŪ¤Î´Ì¤ò¤â¤È¤Î°ÌÃÖ¡Êľ·Â7cm¤Î±ß¡Ë¤«¤é¾¯¤·½Ð¤·¤Æ¤·¤Þ¤Ã¤¿¾ì¹ç¤Ï1ÅÀ¸ºÅÀ¡¢È¾Ê¬°Ê¾å½Ð¤·¤Æ¤·¤Þ¤Ã¤¿¾ì¹ç¤Ï2ÅÀ¤Þ¤¿¤Ï¼èÆÀ¤·¤¿ÆÀÅÀ¤ÎȾʬ¤Î¤¤¤º¤ì¤«~
    ¾¯¤Ê¤¤¤Û¤¦¤ò¸ºÅÀ¡¢¤½¤Î´Ì¤ò´°Á´¤Ë¤À¤·¤Æ¤·¤Þ¤Ã¤¿¤È¤­¤ÏÅÀ¿ô¤òȾʬ¤Ë¤¹¤ë¡£~
   ◦¥À¥ß¡¼¤Î´Ì¤¬¤â¤È¤Î°ÌÃÖ¤«¤é°ÜÆ°¤·¤Æ¤â¸ºÅÀ¤Ï¤·¤Ê¤¤¡£~

µ»½ÑÅÀ¤Î·×»»ÊýË¡~
   ◦°Ê²¼¤ÎÆ°ºî¤ÎÀºÅÙ¡¦¥¹¥Ô¡¼¥É¡¦³Î¼ÂÀ­¤Ê¤É¤ò´Þ¤á¤¿µ»½ÑŪ¤Ê¹©Éפä·Ý½ÑÀ­¤Ë¤Ä¤¤¤Æ¾¤ÎÁ´¤Æ¤Î¥Á¡¼¥à(5¥Á¡¼¥à)¤¬20ÅÀËþÅÀ¤ÇºÎÅÀ¤·¡¢¤½¤ÎÊ¿¶ÑÅÀ¤òµá¤á¤ë¡£ 
   ÆÀÅÀ¤ÎÌܰ¡§~

   ◦¥Ü¡¼¥ëõ¤·¼è¤ê¤Ë¤¤¤¯¤Þ¤Ç¤ÎÆ°ºî (3ÅÀ)~
   ◦¥Ü¡¼¥ëÄϤàÆ°ºî (3ÅÀ)~
   ◦¥Ü¡¼¥ë¤ò±¿¤ÖÆ°ºî (2ÅÀ)~
   ◦¥Ü¡¼¥ë¤ò´Ì¤ËÃÖ¤¯Æ°ºî (2ÅÀ)~
   ◦2Âæ¤ÎNXT¡¢EV3¤ÎÏ¢·È¤ÎÎɤµ(2ÅÀ)~
   ◦¼«Î©·¿¤Î¥í¥Ü¥Ã¥È¤È¤·¤Æ¤Î·Á¤äÆ°ºî¤ÎÈþ¤·¤µ¡¢»Â¿·¤µ(2ÅÀ)~
   ◦¤½¤Î¾ (3ÅÀ)~

*ºîÀï [#pe756174]

**¥³¡¼¥¹¤Ë¤Ä¤¤¤Æ [#i0c8289e]
¥³¡¼¥¹¤Ë´Ø¤·¤Æ¤Ï°Ê²¼¤Î¤è¤¦¤Ë¿Ê¤à¤³¤È¤Ë¤·¤¿¡£~
ÀÖ¤ÎÀþ¤ÏÀÖ¤¤¥Ü¡¼¥ë¤òÀ֤δ̤ËÃÖ¤¯¤Þ¤Ç¤ò¼¨¤·¤¿¤â¤Î¤ÇÀĤÎÀþ¤ÏÀĤ¤¥Ü¡¼¥ë¤òÀĤδ̤ËÃÖ¤¯¤Þ¤Ç¤ò¼¨¤·¤¿¤â¤Î¤Ç¤¢¤ë¡£~

¤Þ¤º¡¢X¤«¤é¥¹¥¿¡¼¥È¤·G¤ÇÀ֤Υܡ¼¥ë¤ò½¦¤¦¡£¤½¤·¤ÆE¤Þ¤Ç¹Ô¤­¡¢¤½¤³¤ÇÀµ¤·¤¤´Ì¤ò¸«¤Ä¤±¤ë¡£~
¸«¤Ä¤±¤¿¤é¡¢¤½¤Î´Ì¤Þ¤Ç°ìľÀþ¤Ë¿Ê¤ß¡Ê¤É¤Î´Ì¤Ë¿Ê¤à¤«¤ÎÀþ¤Ï½ñ¤¤¤Æ¤¤¤Ê¤¤¡Ë¡¢¥Ü¡¼¥ë¤òÃÖ¤¯¡£~
ÃÖ¤¤¤¿¤éEÃÏÅÀ¤ËÌá¤ê¡¢I¤ÇÀĤΥܡ¼¥ë¤ò½¦¤¤¡¢K¤Þ¤Ç¹Ô¤­¡¢Àµ¤·¤¤´Ì¤ò¸«¤Ä¤±¡¢¥Ü¡¼¥ë¤òÃÖ¤¯¡£

&ref(2018b/Member/Yoshi/Mission3/¥í¥Ü¥Æ¥£¥¯¥¹²ÝÂê3.jpg,100%,´°À®);

**¥í¥Ü¥Ã¥È¤Ë¤Ä¤¤¤Æ [#ec55b3e1]

¥í¥Ü¥Ã¥È¤Ï°Ê²¼¤Î¼Ì¿¿¤Î¤è¤¦¤Ê¤â¤Î¤Ë¤·¤¿¡£
°Ê²¼¥»¥ó¥µ¡¼¤Ê¤É¤ÎÀâÌÀ
¥¢¡¼¥à¤ÎÀâÌÀ

&ref(2018b/Member/Yoshi/Mission3/²ÝÂê301.JPG,100%,´°À®);

Á´¤Æ¤ÎÆ°ºî¤ò1¤Ä¤Ç¹Ô¤¦¥í¥Ü¥Ã¥È¤Ç¤¢¤ë¡£ËÜÂΤò2¤Ä»È¤Ã¤Æ¤¤¤ë¤è¤¦¤Ë¸«¤¨¤ë¤¬¡¢¸å¤í¤Î1¤Ä¤Ï¥¢¡¼¥à¤¬¥Ü¡¼¥ë¤ò»ý¤Ä¤È¤­Á°¤Î¤á¤ê¤Ë¤Ê¤Ã¤ÆÅݤì¤ë¤Î¤òËɤ°¤¿¤á¤Î¤â¤Î¤Ê¤Î¤Ç¡¢¼ÂºÝ¤Ë¤Ï1¤Ä¤·¤«»È¤Ã¤Æ¤¤¤Ê¤¤¡£¥¢¡¼¥à¤Ï¥â¡¼¥¿¤ò2¤Ä»È¤Ã¤Æ¾å²¼¤ÎÆ°¤­¤È³«ÊĤ¬¤Ç¤­¤ë¤è¤¦¤Ë¤·¤¿¡£~
°Ê²¼¤Î¼Ì¿¿¤Ï¡¢Ä¶²»ÇÈ¥»¥ó¥µ¤È¥«¥é¡¼¥»¥ó¥µ¤Ë¤Ä¤¤¤Æ¤Î¤â¤Î¤Ç¤¢¤ë¡£Àִݤ¬Ä¶²»ÇÈ¥»¥ó¥µ¡¢ÀĴݤ¬¥«¥é¡¼¥»¥ó¥µ¤Ç¤¢¤ë¡£Ä¶²»ÇÈ¥»¥ó¥µ¤Ï¥Ü¡¼¥ë¤ò¸«¤Ä¤±¤ë¤¿¤á¡¢¥¢¡¼¥à¤ÈƱ¤¸¼´¤Ë¤¢¤ë¤è¤¦¤Ë¤·¤¿¡£¥«¥é¡¼¥»¥ó¥µ¤ÏºÇ½é2¤Ä»È¤Ã¤Æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤·¤è¤¦¤È»×¤Ã¤¿¤¬¡¢·ë¶É¤¦¤Þ¤¯¤¤¤«¤º1¤Ä¤À¤±¤Ç¹Ô¤¦¤³¤È¤Ë¤·¤¿¡£

&ref(2018b/Member/Yoshi/Mission3/²ÝÂê302 (2).jpg,100%,´°À®);


**¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤Ä¤¤¤Æ [#m7ad7c36]

¥é¥¤¥ó¥È¥ì¡¼¥¹¤ÏºÇ½é¡¢¥«¥é¡¼¥»¥ó¥µ¤ò2¸Ä»È¤¤¹Ô¤ª¤¦¤È»×¤Ã¤¿¤¬¡¢¤¦¤Þ¤¯¤¤¤«¤º·ë¶ÉÁ°²ó¤Î²ÝÂê2¤Î¥«¥é¡¼¥»¥ó¥µ¤ò°ì¤Ä¤À¤±»È¤Ã¤Æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ë¤â¤Î¤Ë¤·¤¿¡£

**¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ [#leba3965]

¥×¥í¥°¥é¥à¤Ë´Ø¤·¤Æ¤Ï¡¢Â礭¤¯Ê¬¤±¤Æ2¤Ä¤Î¤³¤È¤ò¤É¤Î¤è¤¦¤Ê´Ø¿ô¤Ç½èÍý¤¹¤ì¤Ð¤è¤¤¤«¹Í¤¨¤¿¡£
´Ì¤òõ¤¹¤Î¤È¡¢´Ì¤Ë¶á¤Å¤¯

*¥×¥í¥°¥é¥à¤ÎÀâÌÀ [#nf30f369]

**¥×¥í¥°¥é¥à¤ÎƳÆþ [#t49ebfe6]
 #!/usr/bin/env python3
 from ev3dev.ev3 import *
 import time
 mL=LargeMotor('outA') #ÁõÃÖA¤Î¥â¡¼¥¿¡¼¤òmL¤È¤ª¤¯
 mR=LargeMotor('outD') #ÁõÃÖD¤Î¥â¡¼¥¿¡¼¤òmR¤È¤ª¤¯
 mA=MediumMotor('outC') #ÁõÃÖC¤Î¥â¡¼¥¿¡¼¤òmA¤È¤ª¤¯
 mC=MediumMotor('outB') #ÁõÃÖB¤Î¥â¡¼¥¿¡¼¤òmC¤È¤ª¤¯
 csR=ColorSensor('in1') #ÁõÃÖ1¤Î¥â¡¼¥¿¡¼¤òcsR¤È¤ª¤¯
 #csL=ColorSensor('in2') #·ë¶É»È¤ï¤Ê¤«¤Ã¤¿
 us=UltrasonicSensor('in3') #ÁõÃÖ3¤Î¥â¡¼¥¿¡¼¤òus¤È¤ª¤¯

**ÄêµÁ¤ÎƳÆþ [#ldeee58a]
 def turnR1():¡¡#´Ë¤ä¤«¤Ë±¦¤Ë¶Ê¤¬¤ë´Ø¿ô¤òÄêµÁ
    mL.run_forever(speed_sp=100,stop_action='brake')
    mR.stop()

 
 def turnL1(): #´Ë¤ä¤«¤Ëº¸¤Ë¶Ê¤¬¤ë´Ø¿ô¤òÄêµÁ
    mR.run_forever(speed_sp=100,stop_action='brake')
    mL.stop()


 def run1(): #®¤á¤Ë¤Þ¤Ã¤¹¤°¿Ê¤à´Ø¿ô¤òÄêµÁ
    mR.run_forever(speed_sp=100,stop_action='brake')
    mL.run_forever(speed_sp=100,stop_action='brake')

 
 def turnR2(): #±¦¤ËµÞ¥«¡¼¥Ö¤¹¤ë´Ø¿ô¤òÄêµÁ
    mL.run_forever(speed_sp=100,stop_action='brake')
    mR.run_forever(speed_sp=-70,stop_action='brake')


 def turnL2(): #º¸¤ËµÞ¥«¡¼¥Ö¤¹¤ë´Ø¿ô¤òÄêµÁ
    mR.run_forever(speed_sp=100,stop_action='brake')
    mL.run_forever(speed_sp=-70,stop_action='brake')


 def traceR(): #±¦Â¦¤ò¥È¥ì¡¼¥¹¤¹¤ë´Ø¿ô¤òÄêµÁ
    t0=time.time()
    while time.time()-t0<0.35:
        if cs.value()<35:
            turnR2()
        if 35<=cs.value()<40:
            turnR1()
            t0=time.time()
        if 40<=cs.value()<=50:
            run1()
            t0=time.time()
        if 50<cs.value()<=60:
            turnL1()
            t0=time.time()
        if cs.value()>60:
            turnL2()
            t0=time.time()
    mR.stop()
    mL.stop()


 def traceRa(t): #¹¥¤­¤Ê»þ´Ö¤À¤±±¦Â¦¤ò¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ë´Ø¿ô¤òÄêµÁ
    t1=time.time()
    while time.time()-t1<t:
            if cs.value()<35:
                turnR2()
            if 35<=cs.value()<40:
                turnR1()
            if 40<=cs.value()<=50:
                run1()
            if 50<cs.value()<=60:
                turnL1()
            if cs.value()>60:
                turnL2()
        mR.stop()
        mL.stop()


 def run2(): #ÃÙ¤á¤Ë¤Þ¤Ã¤¹¤°¿Ê¤à´Ø¿ô¤òÄêµÁ
    mL.run_forever(speed_sp=50, stop_action='brake')
    mR.run_forever(speed_sp=50, stop_action='brake')

 

 def forward(): #¾¯¤·¿Ê¤à´Ø¿ô¤òÄêµÁ
    mL.run_to_rel_pos(position_sp=360, speed_sp=500, stop_action='brake')
    mR.run_to_rel_pos(position_sp=360, speed_sp=500, stop_action='brake')
 

 def forward_bit(): #¤Û¤ó¤Î¾¯¤·¿Ê¤à´Ø¿ô¤òÄêµÁ
    mL.run_to_rel_pos(position_sp=200, speed_sp=500, stop_action='brake')
    mR.run_to_rel_pos(position_sp=200, speed_sp=500, stop_action='brake')

 

 def catchup(): #¥Ü¡¼¥ë¤Ë¶á¤Å¤¤¤Æ¼è¤Ã¤Æ»ý¤Á¾å¤²¤ë´Ø¿ô¤òÄêµÁ
    while us.value()>=50:
        run2()
    mR.stop()
    mL.stop()
    mC.reset()
    mC.run_to_abs_pos(position_sp=60 ,speed_sp=20, stop_action='brake')
    time.sleep(3)
    mA.run_to_abs_pos(position_sp=100, speed_sp=30, stop_action='brake')
    time.sleep(4)
    mC.run_to_abs_pos(position_sp=0, speed_sp=20, stop_action='brake')
    time.sleep(6)
    mA.run_to_abs_pos(position_sp=0, speed_sp=100, stop_action='hold')
    time.sleep(3)


 def puton_red(): #À֤δ̤˶á¤Å¤¤¤Æ¥Ü¡¼¥ë¤òÃÖ¤¯´Ø¿ô¤òÄêµÁ
    time4=time.time()
    while us.value>=40:
        run()
    time_kan=time.time()
    mC.run_to_rel_abs(position_sp=30, speed_sp=20, stop_action='brake')
    time.sleep(1)
    timenow=time.time()
    while time.time()-timenow<=time_kan-time4:
        mL.run_forever(speed_sp=-50, stop_action='brake')
        mR.run_forever(speed_sp=-50, stop_action='brake')


 def puton_blue(): #ÀĤδ̤˶á¤Å¤¤¤Æ¥Ü¡¼¥ë¤òÃÖ¤¯´Ø¿ô¤òÄêµÁ
    while us.value>=40:
        run()
     mC.run_to_rel_abs(position_sp=30, speed_sp=20, stop_action='brake')


 def direct_one(): #À֤έ¡¤Î´Ì¤ÎÊý¸þ¤ò¸þ¤¯´Ø¿ô¤òÄêµÁ
    time1=time.time()
    while time.time()-time1<=20:
        mL.run_forever(speed_sp=-50, stop_action='brake')
        mR.run_forever(speed_sp=50, stop_action='brake')
 

 def Round_red(): #À֤δ̤Υ¨¥ê¥¢¤ò²ó¤ë´Ø¿ô¤òÄêµÁ
    time1=time.time()
    while time.time()-time1<=fuga:
        mL.run_forever(speed_sp=50, stop_action='brake')
        mR.run_forever(speed_sp=-50, stop_action='brake')


 def direct_redkan(): #ÀÖ¤ÎÀµ¤·¤¤´Ì¤ò¸«¤Ä¤±¤ë´Ø¿ô¤òÄêµÁ
    time1=time()
    while time.time()-time1<=fuga-(think_red()-time_start):
        mL.run_forever(speed_sp=-50, stop_action='brake')
        mR.run_forever(speed_sp=50, stop_action='brake')
 

 def direct_I(): #°ÌÃÖI¤ÎÊý¸þ¤ò¸þ¤¯´Ø¿ô¤òÄêµÁ
    time1=time.time()
    while time.time()-time1<=think_red()-time_start+¤¤¤¯¤é¤«:
        mL.run_forever(speed_sp=-50, stop_action='brake')
        mR.run_forever(speed_sp=50, stop_action='brake')


 def direct_B(): #°ÌÃÖB¤ÎÊý¸þ¤ò¸þ¤¯´Ø¿ô¤òÄêµÁ
    time1=time.time()
    while time.time()-time1<=20:
        mL.run_forever(speed_sp=-50, stop_action='brake')
        mR.run_forever(speed_sp=50, stop_action='brake')
 

 def Round_blue(): #ÀĤδ̤Υ¨¥ê¥¢¤ò²ó¤ë´Ø¿ô¤òÄêµÁ
    time1=time.time()
    while time.time()-time1<=fuga2:
        mL.run_forever(speed_sp=50, stop_action='brake')
        mR.run_forever(speed_sp=-50, stop_action='brake')
 

 def direct_bluekan(): #ÀĤÎÀµ¤·¤¤´Ì¤ò¸«¤Ä¤±¤ë´Ø¿ô¤òÄêµÁ
    time1=time()
    while time.time()-time1<=fuga2-(think_blue()-time_start):
        mL.run_forever(speed_sp=-50, stop_action='brake')
        mR.run_forever(speed_sp=50, stop_action='brake')
 

 time_start=0
 time_a=0
 time_b=0
 def search(fuga,hoge): #¤É¤ì¤¬Àµ¤·¤¤´Ì¤«¤ò¸«¤Ä¤±¤ë´Ø¿ô¤òÄêµÁ
    global time_start
    global time_a
    global time_b
    a=1250
    b=1250
    time0=time_start=time.time()
    while us.value()>=hoge: 
        continue
    while time.time()-time0<=fuga:
        if us.value()<=hoge:
            if us.value()<=a:
                a=us.value()
                time_a=time.time()
        else:
            break   
    while time.time()-time0<=fuga and us.value()>=hoge:
        continue
    while time.time()-time0<=fuga:
        if us.value()<=hoge:
            if us.value()<=b:
                b=us.value()
                time_b=time.time()
        else:
            break
 

 def think_red(): #ÀÖ¤ÎÀµ¤·¤¤´Ì¤ò·è¤á¤ë´Ø¿ô¤òÄêµÁ
    if a<b:
        return time_a
    else:
        return time_b


 def think_blue(): #ÀĤÎÀµ¤·¤¤´Ì¤ò·è¤á¤ë´Ø¿ô¤òÄêµÁ
    if a<150 and b<150:
        return time_b
    if a<150 and 150<=b<300:
        return time_a
    if 150<=a<300 and 150<=b<300:
        return time_a
    if a<300 and b=1250:
        return time_a
    if a>=300 and b=1250:
        return time_b
    if 450<b<550:
        return time_b
 

*²ÝÂê [#mf770ef7]
¥Ü¡¼¥ë¤ò»ý¤Á¾å¤²¤é¤ì¤Ê¤¤¤³¤È
¥«¥é¡¼¥»¥ó¥µ¤ò2¸ÄÉÕ¤±¤¿¤³¤È¤Ë¤è¤ë¤â¤Î
Á°¤Î¤á¤ê¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¤³¤È
½àÈ÷ÉÔ­
´Ì¤Î¿§¤Ë¤è¤Ã¤Æ´Ø¿ô¤òʬ¤±¤¿¤³¤È hoge¤äfuga¤ÎÀâÌÀ¡¡ºÇûµ÷Î¥¤ÎÀâÌÀ


¥È¥Ã¥×   ¿·µ¬ °ìÍ÷ ¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS