[[2019a/Member]]¢«2019ǯÅÙÁ°´ü¼õ¹ÖÀ¸°ìÍ÷¤ØÌá¤ë *º£²ó¤Î²ÝÂê [#v100fc77] &ref(2019a/Member/fuji/Mission3/mission3.png,80%,¥í¥Ü¥Ã¥È); º£²ó¤Î²ÝÂê¤Ï[[2019a/Mission3]]¤Ë·ÇºÜ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ *À©ºî¤·¤¿¥í¥Ü¥Ã¥È [#b21f7756] º£²ó¡¢¼«Ê¬¤ÎÈÉ¤ÏÆó¤Ä¤Î¥í¥Ü¥Ã¥È¤Çʬô¤µ¤»¤Þ¤·¤¿¡£ ¡¥È¥ì¡¼¤ËÆþ¤Ã¤¿¥Ü¡¼¥ë¤ò²ó¼ý¤¹¤ë¥í¥Ü¥Ã¥È &ref(2019a/Member/fuji/Mission3/ev3.png,80%,¥í¥Ü¥Ã¥È); ¢¥é¥¤¥ó¾å¤ËÃÖ¤¤¤Æ¤¢¤ë¥Ü¡¼¥ë¤ò²ó¼ý¤¹¤ë¥í¥Ü¥Ã¥È &ref(2019a/Member/fuji/Mission3/ev3_3.png,80%,¥í¥Ü¥Ã¥È); ¼«Ê¬¤Ï¼ç¤Ë¡¤Î¥í¥Ü¥Ã¥È¤òôÅö¤·¤Þ¤·¤¿¡£Á°²ó¤Î[[2019a/Member/fuji/Mission2]]¤Î¥í¥Ü¥Ã¥È¤ò¾¯¤·²þÊѤ·¤ÆºîÀ®¤·¤Þ¤·¤¿¡£¢¤Î¥í¥Ü¥Ã¥È¤Î¥×¥í¥°¥é¥ß¥ó¥°¡¦¾ÜºÙ¤Ï¤¢¤Þ¤êÇİ®¤·¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢µ½Ò¤Ï¤Û¤È¤ó¤É¤¢¤ê¤Þ¤»¤ó¡£ ¾Ü¤·¤¯¤Ï¤³¤Á¤é¢ª[[2019a/Member/TOY/Mission3]] *ưºî¤Ë¤Ä¤¤¤Æ¤ÎÁÀ¤¤¡¦Àïά [#t8f0b576] ¡¤Î¥í¥Ü¥Ã¥È 1,¥È¥ì¡¼¤Î²¼¤Ë¥¢¡¼¥à¤ò¤¯¤°¤é¤»¡¢¥Ü¡¼¥ë¤ò¥È¥ì¡¼¤´¤È»ý¤Ä &ref(2019a/Member/fuji/Mission3/ev3.png,60%,¥í¥Ü¥Ã¥È);¡¡¢ª¡¡ &ref(2019a/Member/fuji/Mission3/ev3_2.png,60%,¥í¥Ü¥Ã¥È); 2.¥¢¡¼¥à¤ò¤µ¤é¤Ë»ý¤Á¾å¤²¥Ü¡¼¥ë¤ò¼ÐÌ̾å¤Ç³ê¤é¤»¤ë &ref(2019a/Member/fuji/Mission3/ev3_5.png,60%,¥í¥Ü¥Ã¥È);¡¡¢ª¡¡ &ref(2019a/Member/fuji/Mission3/ev3_6.png,60%,¥í¥Ü¥Ã¥È);¡¡¢ª¡¡ &ref(2019a/Member/fuji/Mission3/ev3_7.png,60%,¥í¥Ü¥Ã¥È); ¢¤Î¥í¥Ü¥Ã¥È ¥Ü¡¼¥ë¤òÄϤߡ¢¼ÐÌ̤˳ê¤é¤»¤Æ¥´¡¼¥ë¤ËÆþ¤ì¤ë &ref(2019a/Member/fuji/Mission3/ev3_8.png,60%,¥í¥Ü¥Ã¥È);¡¡¢ª¡¡ &ref(2019a/Member/fuji/Mission3/ev3_10.png,60%,¥í¥Ü¥Ã¥È); *¹©Éפ·¤¿ÅÀ [#o0b2006c] &ref(2019a/Member/fuji/Mission3/ev3_4.png,80%,¥í¥Ü¥Ã¥È); ¥È¥ì¡¼¤¬½ÐÍè¤ë¤À¤±¥º¥ì¤Ê¤¤¤è¤¦¤Ë¥¹¥È¥Ã¥Ñ¡¼¤ò¤Ä¤±¤¿¤ê¡¢¼ÐÌ̤ò¸ÇÄꤷ¤Ê¤¤¤³¤È¤Ç¼Â¸½¤¬Æñ¤·¤¤³ÑÅ٤μÐÌ̤ò·ÁÀ®¤·¤Þ¤·¤¿¡£ ¤Þ¤¿¡¢¥¢¡¼¥àÀ褬½Å¤¯¤Ê¤ê²á¤®¤Ê¤¤¤è¤¦¤Ë½ÐÍè¤ë¤À¤±Â¤¤ê¤ò¥·¥ó¥×¥ë¤Ë¤·¤Þ¤·¤¿¡£ *¥×¥í¥°¥é¥à [#l4ef4d2b] #!/usr/bin/env python3 from ev3dev.ev3 import * from time import sleep mL = LargeMotor('outB') mR = LargeMotor('outD') mZ = MediumMotor('outA') cs = ColorSensor('in1') cs.mode = 'COL-REFLECT' def motor_init(): mL.reset() mR.reset() mZ.reset() -¥¢¡¼¥à¤ò²¼¤²¤ë¥×¥í¥°¥é¥à def down(): mZ.run_timed(time_sp=600,speed_sp=150,stop_action='brake') sleep(1) -¥È¥ì¡¼¤´¤È¥¢¡¼¥à¤ò¾å¤²¤ë¥×¥í¥°¥é¥à def up(): mZ.run_timed(time_sp=685,speed_sp=-160,stop_action='hold') sleep(1) -¥È¥ì¡¼¤ò¹¹¤Ë»ý¤Á¾å¤²¡¢¥Ü¡¼¥ë¤ò¥´¡¼¥ë¤Ëή¤·¹þ¤à¥×¥í¥°¥é¥à def up2(): mZ.run_timed(time_sp=285,speed_sp=-569,stop_action='hold') sleep(1) -¥È¥ì¡¼¤òÊü¤êÅꤲ¡¢¥ë¡¼¥ë¤Ë§¤ë¤è¤¦¤Ë¥È¥ì¡¼¤ò½èÍý¤¹¤ë¥×¥í¥°¥é¥à def nage(): mZ.run_timed(time_sp=400,speed_sp=-1000,stop_action='brake') sleep(1) -¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤ª¤±¤ëÁ°¤Ø¿Ê¤à¥×¥í¥°¥é¥à def go(): mL.run_timed(time_sp=80,speed_sp=150,stop_action='brake') mR.run_timed(time_sp=80,speed_sp=150,stop_action='brake') -¸òº¹ÅÀǧ¼±¸åÀþ¤òͤ¨¤¿¤ê¡¢¿ÍÎϤˤè¤ëÄ´À°ÍѤÎÁ°¿Ê def over(t): mL.run_timed(time_sp=t,speed_sp=200,stop_action='brake') mR.run_timed(time_sp=t,speed_sp=200,stop_action='brake') sleep(1) -¿ÍÎϤˤè¤ëÄ´À°ÍѤθå¿Ê def back(t): mL.run_timed(time_sp=t,speed_sp=-200,stop_action='brake') mR.run_timed(time_sp=t,speed_sp=-200,stop_action='brake') -¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤ª¤±¤ë±¦ÀÞÍÑ def turnl2(): mL.run_timed(time_sp=200,speed_sp=45,stop_action='brake') mR.run_timed(time_sp=200,speed_sp=-50,stop_action='brake') sleep(1) -¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤ª¤±¤ëº¸ÀÞÍÑ def turnr2(): mR.run_timed(time_sp=200,speed_sp=75,stop_action='brake') mL.run_timed(time_sp=200,speed_sp=-45,stop_action='brake') -º¸Â¦¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤ª¤±¤ë¸òº¹ÅÀǧ¼±¸å¤Î½¤ÀµÍÑ¥×¥í¥°¥é¥à def turnr2X(x): mR.run_timed(time_sp=x,speed_sp=-75,stop_action='brake') mL.run_timed(time_sp=x,speed_sp=45,stop_action='brake') -±¦Â¦¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤ª¤±¤ë¸òº¹ÅÀǧ¼±¸å¤Î½¤ÀµÍÑ¥×¥í¥°¥é¥à def turnr2Y(y): mR.run_timed(time_sp=y,speed_sp=45,stop_action='brake') mL.run_timed(time_sp=y,speed_sp=-75,stop_action='brake') -¿ÍÎϤˤè¤ëº¸ÀÞÄ´À°ÍÑ def turnC(a): mR.run_timed(time_sp=a,speed_sp=-150,stop_action='brake') mL.run_timed(time_sp=a,speed_sp=150,stop_action='brake') sleep(1) -¿ÍÎϤˤè¤ë±¦ÀÞÄ´À°ÍÑ def turnD(a): mR.run_timed(time_sp=a,speed_sp=150,stop_action='brake') mL.run_timed(time_sp=a,speed_sp=-150,stop_action='brake') sleep(1) -º¸Â¦¤Ë¤ª¤±¤ë¥é¥¤¥ó¥È¥ì¡¼¥¹ def linel(): S = 1 while S > 0:¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#·«¤êÊÖ¤·³«»Ï go() if cs.value() > 15:¡¡¡¡¡¡¡¡¡¡¡¡¡¡#Çò(º¸)¤Ë¹Ô¤²á¤®¤ë¤È while cs.value() > 15: turnl2() #¹õ(±¦)¤Ë¸þ¤«¤Ã¤Æ¿Ê¤à if cs.value() < 9: #¹õ(±¦)¤Ë¹Ô¤²á¤®¤ë¤È tS = time.time()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#»þ´Ö·×¬³«»Ï while cs.value() < 9: turnr2()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ #Çò(º¸)¤Ë¸þ¤«¤Ã¤Æ¿Ê¤à if time.time()-tS > 0.48:¡¡¡¡¡¡¡¡#·×¬»þ´Ö¤¬°ìÄê°Ê¾å¤À¤È¸òº¹ÅÀ¤òǧ¼±¤¹¤ë turnr2X((time.time()-tS)*1400)¡¡#¶Ê¤¬¤ê¤¹¤®¤¿Ê¬¤ò½¤Àµ¤¹¤ë S = 0¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#·«¤êÊÖ¤·¤ò½ªÎ»¤¹¤ë sleep(1) -±¦Â¦¤Ë¤ª¤±¤ë¥é¥¤¥ó¥È¥ì¡¼¥¹ def liner(): S = 1 while S > 0:¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#·«¤êÊÖ¤·³«»Ï go() if cs.value() > 15:¡¡¡¡¡¡¡¡¡¡¡¡¡¡#Çò(±¦)¤Ë¹Ô¤²á¤®¤ë¤È while cs.value() > 15: turnr2()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ #¹õ(º¸)¤Ë¸þ¤«¤Ã¤Æ¿Ê¤à if cs.value() < 9:¡¡¡¡¡¡¡¡¡¡¡¡¡¡ #¹õ(º¸)¤Ë¹Ô¤²á¤®¤ë¤È tS = time.time()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#»þ´Ö·×¬³«»Ï while cs.value() < 9: turnl2()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ #Çò(±¦)¤Ë¸þ¤«¤Ã¤Æ¿Ê¤à if time.time()-tS > 0.48:¡¡¡¡¡¡ #·×¬»þ´Ö¤¬°ìÄê°Ê¾å¤À¤È¸òº¹ÅÀ¤òǧ¼±¤¹¤ë turnr2Y((time.time()-tS)*1400) #¶Ê¤¬¤ê¤¹¤®¤¿Ê¬¤ò½¤Àµ¤¹¤ë S = 0¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#·«¤êÊÖ¤·¤ò½ªÎ»¤¹¤ë sleep(1) &ref(2019a/Member/fuji/Mission3/line_LI.jpg,100%,Æ»); ¿Þ¤Ëɽ¤¹¤È¤³¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£²«¿§¤Ïº¸Â¦¥È¥ì¡¼¥¹¡¢Îп§¤Ï±¦Â¦¥È¥ì¡¼¥¹¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£ -¹õ¤¤Àþ¤¬¸«¤Ä¤«¤ë¤Þ¤Çľ¿Ê¤¹¤ë¥×¥í¥°¥é¥à def running(): while cs.value() > 15: go() sleep(1) -ÄêµÁ¤òƧ¤Þ¤¨¤Æ¤Î¥×¥í¥°¥é¥à motor_init() sleep(110) #¤â¤¦°ì¤Ä¤Î¥í¥Ü¥Ã¥È¤È¤Ö¤Ä¤«¤é¤Ê¤¤¤è¤¦¤ËÂÔ¤Ä liner()¡¡¡¡¡¡¡¡#A¤«¤é¥¹¥¿¡¼¥È¤·¡¢±¦Â¦¤òé¤ê¸òº¹ÅÀC¤òǧ¼± over(833) #¤³¤³¤«¤é¥È¥ì¡¼¤Þ¤Ç¤Î°ÌÃÖ¤òÄ´À°¤¹¤ë sleep(1) turnC(1760) back(2000) sleep(3) down()¡¡¡¡¡¡¡¡ #¥¢¡¼¥à¤ò²¼¤²¤ë over(2000)¡¡¡¡ #¥È¥ì¡¼¤Î²¼¤Ë¥¢¡¼¥à¤òÄ̤¹ sleep(3) up()¡¡¡¡¡¡¡¡¡¡ #¥¢¡¼¥à¤ò¾å¤²¤ë sleep(1) turnC(800)¡¡¡¡ #ÊÕBC¤ËÊý¸þž´¹ over(400) linel()¡¡¡¡¡¡¡¡#C¤«¤éB¤Øº¸Â¦¤òé¤ê¡¢B¤Ç¸òº¹ÅÀǧ¼±¤ò¤¹¤ë turnC(900)¡¡¡¡ #ÀþB'D'¤Ë¸þ¤«¤Ã¤ÆÊý¸þž´¹ over(500)¡¡¡¡¡¡#Àþ¤ò¤Þ¤¿¤° running()¡¡¡¡¡¡#ÀþB'D'¤ËÃ夯¤Þ¤ÇÁ°¿Ê sleep(3) turnC(1910)¡¡¡¡#180ÅÙÊý¸þž´¹ sleep(4) back(300)¡¡¡¡¡¡#¥È¥ì¡¼¤Ë¶á¤Å¤¯ sleep(1) up2()¡¡¡¡¡¡¡¡¡¡#¥È¥ì¡¼¤Ø¥Ü¡¼¥ë¤òή¤·¹þ¤à sleep(2) down()¡¡¡¡¡¡¡¡ #¤³¤³¤Ç¥¢¡¼¥à¤ò¾å¤²²¼¤²¤ò¤·¤Æ¡¢Î®¤·¤½¤Ó¤ì¤¿¥Ü¡¼¥ë¤ò³Î¼Â¤ËÆþ¤ì¤è¤¦¤È¤¹¤ë sleep(1) up() over(150)¡¡¡¡¡¡#Ʊ¤¸¤¯Á°¿Ê¤È¸å¿Ê¤ò¹Ô¤¤¡¢¥Ü¡¼¥ë¤ò³Î¼Â¤Ë½èÍý¤¹¤ë sleep(0.5) back(150) sleep(1) turnD(500)¡¡¡¡ #ÀþBD¤Ë¸þ¤«¤Ã¤ÆÊý¸þž´¹ running()¡¡¡¡¡¡#ÀþBD¤ËÃ夯¤Þ¤ÇÁ°¿Ê linel()¡¡¡¡¡¡¡¡#ÀþBD¤Îº¸Â¦¤òé¤ê¡¢D¤Ç¸òº¹ÅÀǧ¼±¤ò¤¹¤ë over(150) sleep(1) turnC(1100) #±ßGHIJ¤Ë¸þ¤«¤Ã¤ÆÊý¸þž´¹ down()¡¡¡¡¡¡¡¡ #¤³¤³¤ÎÆó¤Ä¤Ç¥È¥ì¡¼¤òÈàÊý¤ØÈô¤Ð¤·¡¢¥ë¡¼¥ë°ãÈ¿¤òÁ˻ߤ¹¤ë nage() *¼ÂºÝ¤Ë¥í¥Ü¥³¥ó¤ò¤ä¤Ã¤Æ¤ß¤¿·ë²Ì [#q5349f54] ÁêÊý¤Î¥í¥Ü¥Ã¥È¤Ï»þ´Ö¤¬Â¤é¤Ê¤«¤Ã¤¿¤¿¤á¤Ë¡¢´°À®¤âÃ٤졢½¼ÅŤâ¤ê¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£¼«Ê¬Â¦¤Î¥í¥Ü¥Ã¥È¤Ï¥¢¡¼¥à¸ÇÄ꤬¤¢¤Þ¤ê¤Þ¤Þ¤Ê¤é¤Ê¤«¤Ã¤¿°Ù¤Ë¡¢»î¹Ô¤ÎÅ٤˷ë²Ì¤¬º¸±¦¤·¡¢¥º¥ì¤¬À¸¤¸¤Æ¤·¤Þ¤Ã¤¿¡£¥Ü¡¼¥ë¤Ï°ì¸ÄÆþ¤ì¤¿¤¬¡¢ºÆ¥È¥é¥¤¤Ç°ì¸Ä¤âÆþ¤ì¤ì¤Ê¤«¤Ã¤¿¤¬¸Î¤Ë´ðÁÃÅÀ¤Ï0ÅÀ¤È¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¤Î¤¬¤È¤Æ¤âÈᤷ¤«¤Ã¤¿¡£ *È¿¾ÊÅÀ [#d010a92a] -¥¢¡¼¥à¤Î¸ÇÄê¤ò»õ¼Ö¤òÍøÍѤ·¤Æ¹Ô¤¦ ¥¢¡¼¥à¤ò»õ¼Ö¤Ç¸ÇÄꤷ¤Ê¤«¤Ã¤¿¤³¤È¤Ç¡¢¥¢¡¼¥à¤¬°ÂÄꤻ¤º·ë²Ì¤âÉÔ°ÂÄê¤È¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£ -»þ´Ö¤Î;͵¤ò»ý¤Ä(¥Æ¥¹¥È¤Ç»ÅÊý¤Ê¤¤Ì̤⤢¤Ã¤¿¤¬) ¼«Ê¬Â¦¤Ï;͵¤ò»ý¤Ã¤ÆÂ¿¾¯¤Ï¤ä¤ì¤¿¤È»×¤¦¤¬¡¢ÁêÊý¦¤¬¤È¤Æ¤â»þ´Ö¤¬Â¤é¤Ê¤¤ÍͻҤǤ¢¤Ã¤¿¡£ -¥Ô¥ó¥Ý¥ó¶Ì+¥È¥ì¡¼¤¬¥í¥Ü¥Ã¥È¤Ë¤È¤Ã¤Æ¤Ï½Å¤«¤Ã¤¿ ¥¢¡¼¥à¤Î¸ÇÄ꤬½ÐÍè¤Æ¤¤¤Ê¤«¤Ã¤¿¤³¤È¤Ç¡¢¥â¡¼¥¿¡¼°ì¤Ä¤Ç¾åµ¤ÎÆó¤Ä¤ò»ý¤Ä¤³¤È¤È¤Ê¤ê¡¢Ééô¤¬Â礤«¤Ã¤¿¡£¤Þ¤¿¤½¤ì¤Ë¤è¤Ã¤Æ·ë²Ì¤â¤Þ¤¿ÉÔ°ÂÄê¤È¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£ *ºÇ¸å¤Ë [#h1d12bd9] Ⱦǯ´Ö¤ªÈè¤ìÍͤǤ·¤¿¡£¼«Ê¬¤Ë¤È¤Ã¤ÆÇ¼ÆÀ¤Î¤¤¤¯·ë²Ì¤È¤Ê¤Ã¤¿mission¤ÏËØ¤É̵¤«¤Ã¤¿¤¬¡¢¥í¥Ü¥Ã¥È¤ËÇ®Ãæ¤·¤Æ¡¢¤Þ¤¿python¤òͽ½¬½ÐÍè¤Æ¤È¤Æ¤â¤è¤«¤Ã¤¿¤Ç¤¹¡£³Ø²ÊŪ¤Ë¾Íè¤Þ¤¿¿¨¤ì¤ëµ¡²ñ¤â¤¢¤ë¤«¤â¤·¤ì¤Ê¤¤¤Î¤Ç¡¢¤È¤Æ¤â¤¤¤¤·Ð¸³¤Ë¤Ê¤ê¤Þ¤·¤¿¡£ Ⱦǯ´Ö¤ªÈè¤ìÍͤǤ·¤¿¡£¼«Ê¬¤Ë¤È¤Ã¤ÆÇ¼ÆÀ¤Î¤¤¤¯·ë²Ì¤È¤Ê¤Ã¤¿mission¤ÏËØ¤É¤¢¤ê¤Þ¤»¤ó¤Ç¤·¤¿¤¬¡¢¥í¥Ü¥Ã¥È¤ËÇ®Ãæ¤·¤Æ¡¢¤Þ¤¿python¤òͽ½¬½ÐÍè¤Æ¤È¤Æ¤â¤è¤«¤Ã¤¿¤Ç¤¹¡£³Ø²ÊŪ¤Ë¾Íè¤Þ¤¿¿¨¤ì¤ëµ¡²ñ¤â¤¢¤ë¤«¤â¤·¤ì¤Ê¤¤¤Î¤Ç¡¢¤È¤Æ¤â¤¤¤¤·Ð¸³¤Ë¤Ê¤ê¤Þ¤·¤¿¡£ ˬÌä¼Ô¡§Áí·×:&counter(total); º£Æü:&counter(today); ºòÆü:&counter(yesterday);