2017b/Member/yuitom/Mission3
¤ò¥Æ¥ó¥×¥ì¡¼¥È¤Ë¤·¤ÆºîÀ®
[
¥È¥Ã¥×
] [
¿·µ¬
|
°ìÍ÷
|
¸¡º÷
|
ºÇ½ª¹¹¿·
|
¥Ø¥ë¥×
|
¥í¥°¥¤¥ó
]
³«»Ï¹Ô:
[[2017b/Member]]
Ìܼ¡
#contents
*²ÝÂê¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤¯¤¿¤á¤Ë¡Ä [#k81a7a84]
º£²ó»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ï¤³¤Î²ÝÂê¤ò¥¯¥ê¥¢¤¹¤ë¤Ë¤¢¤¿¤Ã¤Æ½ÅÍפȤʤë¥Ý¥¤¥ó¥È¤Ë¤Ä¤¤¤Æ¼¡¤Î¤è¤¦¤Ë¹Í¤¨¤¿¡£
¡¡¡¥³¥Ã¥×¤ÎõººÊýË¡
¡¡¢¥³¥Ã¥×¤Î»ý¤Á±¿¤ÓÊýË¡
¡¡£°Üư¼êÃÊ
¡¡¤Æó¤Ä¤Î¥í¥Ü¥Ã¥È¤Î¶¨ÎÏÊýË¡
º£²ó¤Ï¡¢¾åµ¤Î4¤Ä¤Î¥Ý¥¤¥ó¥È¤ËÃíÌܤ·¤Æ¥í¥Ü¥Ã¥È¡¢¥×¥í¥°¥é¥à¤òºîÀ®¤·¤Æ¤¤¤¯¡£
*¥í¥Ü¥Ã¥È¤ÎÀâÌÀ [#y206a328]
**¥í¥Ü¥Ã¥È¤ÎÁªÂò¡Ê¥Ý¥¤¥ó¥È¤¤Î²ò·è¡Ë [#uda29c80]
¡ü2¤Ä¤Î¥í¥Ü¥Ã¥È¤«¤é¤ÎÁªÂò
¡¡º£²ó¤Î²ÝÂê¤ò¥¯¥ê¥¢¤¹¤ë¤Ë¤¢¤¿¤Ã¤ÆÆó¤Ä¤Î¥í¥Ü¥Ã¥È¤ò¤É¤Î¤è¤¦¤Ë»ÈÍѤ¹¤ë¤«¤¬¤È¤Æ¤âÂçÀڤˤʤäƤ¯¤ë¡£»ä¤¿¤Á¤Ï¡¢2¤Ä¤Î¥í¥Ü¥Ã¥È¤Î»ÈÍѤÏÊýË¡¤Ï¼¡¤Î2Ä̤ꤢ¤ë¤È¹Í¤¨¤¿¡£
¡¡1¡¥2¤Ä¤Î¥í¥Ü¥Ã¥È1¤Ä¤ËÁȤ߹ç¤ï¤»¤ë
¡¡¥á¥ê¥Ã¥È1¡¡¥×¥í¥°¥é¥ß¥ó¥°¤ò´Êñ¤Ê¤â¤Î¤È¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
¡¡¥á¥ê¥Ã¥È2¡¡¥¢¡¼¥à¤Î¹½Â¤¤Ë¥â¡¼¥¿¡¼¤ò2¤Ä»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
¡¡²ÝÂêÅÀ1¡¡ºî¶È¤Î®ÅÙ¤¬ÃÙ¤¯¤Ê¤ë¡Ê1Âæ¤Î¥í¥Ü¥Ã¥È¤È¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¡Ë¡£
¡¡²ÝÂêÅÀ2¡¡¥í¥Ü¥Ã¥È¤¬¤È¤Æ¤â½Å¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£
¡¡2¡¥2¤Ä¤Î¥í¥Ü¥Ã¥È¤òÊÌ¡¹¤Ëư¤«¤¹
¡¡¥á¥ê¥Ã¥È1¡¡ºî¶È¤Î®ÅÙ¤¬Á᤯¤Ê¤ë¡Ê2Âæ¤Î¥í¥Ü¥Ã¥È¤Ç¶¨ÎϤǤ¤ë¤¿¤á¡Ë¡£
¡¡¥á¥ê¥Ã¥È2¡¡2¤Ä¤Î¥í¥Ü¥Ã¥È¤ò»ÈÍѤ·¤¿¶¨ÎϺî¶È¤¬¤Ç¤¤ë¡£
¡¡²ÝÂêÅÀ1¡¡¥¢¡¼¥à¤Î¹½Â¤¤¬¥â¡¼¥¿¡¼¤ò1¤Ä¤·¤«»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¤¿¤áÊ£»¨¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£
¡¡²ÝÂêÅÀ2¡¡¥×¥í¥°¥é¥ß¥ó¥°¤¬Ê£»¨¤Ê¤â¤Î¤È¤Ê¤Ã¤Æ¤·¤Þ¤¦¡Ê¥³¡¼¥¹¾å¤Ç¾×ÆÍ¤·¤Ê¤¤¤è¤¦¤Ë¡ÄÅù¡Ë¡£
º£²ó¤Ï¡¢»þ´Ö¤Î´Ø·¸¤Ç¹½Â¤¤¬´Êñ¤Ç¡¢¤Ê¤ª¤«¤Ä¥×¥í¥°¥é¥ß¥ó¥°¤¬´Êñ¤Ê¤â¤Î¤È¤¹¤ë¤³¤È¤Î¤Ç¤¤ë
¡¡1¡¥2¤Ä¤Î¥í¥Ü¥Ã¥È1¤Ä¤ËÁȤ߹ç¤ï¤»¤ë
¤ÎÊýË¡¤Ç²ÝÂê¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤¤¿¤¤¡£
¡ü¥í¥Ü¥Ã¥È¤Î²ÝÂêÅÀ
¡¡2¤Ä¤Î¥í¥Ü¥Ã¥È1¤Ä¤ËÁȤ߹ç¤ï¤»¤ë¤¿¤á¤Ë¤Ï¡¢°Ê²¼¤Î²ÝÂêÅÀ¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤¯É¬Íפ¬¤¢¤ë¤È¹Í¤¨¤¿¡£
-²ÝÂêÅÀ1¡¡ºî¶È¤Î®ÅÙ¤¬ÃÙ¤¯¤Ê¤ë¡Ê1Âæ¤Î¥í¥Ü¥Ã¥È¤È¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¡Ë¡£
¢ª²ò·èºö¡¡¡Â®ÅÙ¤ÎÊѹ¹¡Ê¥×¥í¥°¥é¥ß¥ó¥°¡Ë
¡¡²ò·èºö¢¡¡¥³¡¼¥¹¤ÎÊѹ¹¡Ê¥×¥í¥°¥é¥ß¥ó¥°¡Ë
¡¡²ò·èºö£¡¡µ¡ÂΤηÚÎ̲½¡Ê¥í¥Ü¥Ã¥È¡Ë
-²ÝÂêÅÀ2¡¡¥í¥Ü¥Ã¥È¤¬¤È¤Æ¤â½Å¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£
¢ª²ò·èºö¡¡¡Â®ÅÙ¤ÎÊѹ¹¡Ê¥×¥í¥°¥é¥ß¥ó¥°¡Ë
¡¡²ò·èºö£¡¡µ¡ÂΤηÚÎ̲½¡Ê¥í¥Ü¥Ã¥È¡Ë
¡¡²ò·èºö¤¡¡¼ÖÎØ¤òÁý¤ä¤¹¡Ê¥í¥Ü¥Ã¥È¡Ë
°Ê¾å¤Î¥Ý¥¤¥ó¥È¤È²ÝÂêÅÀ¤ËÃíÌܤ·¤Æµ¡ÂΤòºîÀ®¤·¤Æ¤¤¤¯¡£
**¥í¥Ü¥Ã¥È¤ÎÁ´ÂÎÁü [#nb010d29]
&ref(2017b/Member/yuitom/Mission3/mission3_µ¡ÂÎ.jpg,50%,µ¡ÂΤÎÁ´ÂÎÁü);
¡¡º£²ó»ä¤¿¤Á¤¬ºîÀ®¤·¤¿¥í¥Ü¥Ã¥È¤Ï2¤Ä¤Î¥í¥Ü¥Ã¥È¤ò1¤Ä¤Ë¤Þ¤È¤á¤¿¤â¤Î¤Ç¡¢¤½¤ì¤¾¤ì²¼¤Î¥í¥Ü¥Ã¥È¤¬¥¢¡¼¥à´ØÏ¢¤òôÅö¤·¡¢¾å¤Î¥í¥Ü¥Ã¥È¤¬°Üư´ØÏ¢¤òôÅö¤·¤Æ¤¤¤ë¡£
¤½¤ì¤¾¤ì¤ÎÉô°Ì¤Ë¤Ä¤¤¤Æ¡¢¡Ö¥Ý¥¤¥ó¥È¡×¤È¡Ö²ÝÂêÅÀ¡×¤ËÃíÌܤ·¾Ü¤·¤¯¸«¤Æ¤¤¤³¤¦¤È»×¤¦¡£
**¥³¥Ã¥×¤ÎÆþ¼êÊýË¡¡Ê¥Ý¥¤¥ó¥È¡¡¢¢¤Î²ò·è¡Ë [#i8b0c8e4]
¡¡º£²ó¤Î²ÝÂê¤Ç¤Ï¥³¥Ã¥×¤ÎÆþ¼êÊýË¡¤È±¿ÈÂÊýË¡¤¬¤È¤Æ¤â½ÅÍפˤʤäƤ¯¤ë¡£
»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤Ï¤³¤ì¤ò²ò·è¤¹¤ë¤¿¤á¤Ë¡¢¥â¡¼¥¿¤ò2¤ÄÍøÍѤ·¤¿¥¢¡¼¥à¤òºîÀ®¤·¤¿¡£
¡ü¥³¥Ã¥×¤ò¤Ä¤«¤àµ¡¹½
-¥³¥Ã¥×¤ò°ú¤´ó¤»¤ë¥¢¡¼¥à
&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à1.jpg,50%,¥³¥Ã¥×¤ÎÆþ¼êÊýË¡¡);
¡¡¢ª¡¡&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à2.jpg,50%,¥³¥Ã¥×¤ÎÆþ¼êÊýË¡¢);
¡¡¾å¤Î¿Þ¤Î¤è¤¦¤Ë¼ÖÎØ¤ò¼è¤êÉÕ¤±¤ë¤³¤È¤Ç¡¢¥³¥Ã¥×¤È¥¢¡¼¥à¤Î°ÌÃÖ¤¬Â¿¾¯¤º¤ì¤Æ¤¤¤Æ¤â¡Ö¥³¥Ã¥×¤ò°ú¤´ó¤»¤Æ¤¬¤Ã¤Á¤ê¤Ä¤«¤à¡×¤³¤È¤ËÀ®¸ù¤·¤¿¡£¤³¤Î»þ¡¢¼ÖÎØ¤Ï¥³¥Ã¥×¤ò°ú¤´ó¤»¤ëƯ¤¤À¤±¤Ç¤Ê¤¯¡¢¥³¥Ã¥×¤¬¤º¤ìÍî¤Á¤ë¤³¤È¤òËɤ°³ê¤ê»ß¤á¤È¤·¤Æ¤âµ¡Ç½¤·¤Æ¤¤¤ë¡£
-ưÎÏ1¤Ä¤Ç¤Î¥¢¡¼¥à¤ÎÀ©¸æ¤ò¼Â¸½¤¹¤ë¤¿¤á¤Ë
&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à4.jpg,50%,¥¢¡¼¥à³«ÊĤλÅÁȤß);
¡¡¾å¤Î²èÁü¤Î¤è¤¦¤Ë»õ¼Ö¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç¡¢¥¢¡¼¥à¤ò³«¤¯ÊĤ¸¤ëưºî¤¬1¤Ä¤Î¥â¡¼¥¿¤Ç½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¤Þ¤¿¡¢¥×¥í¥°¥é¥ß¥ó¥°¤Ë¤Æ²óž³Ñ¤òÍѤ¤¤¿¥â¡¼¥¿¤ÎÀ©¸æ¤ò¹Ô¤Ã¤¿¤³¤È¤Ë¤è¤ê¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òÆþ¼ê¡¦±¿È¤¬¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
¡ü¥³¥Ã¥×¤ò¾å¤²¤ëµ¡¹½
&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à5.jpg,50%,¥¢¡¼¥à¾å²¼¤Î»ÅÁȤß);
»äã¤Î¥°¥ë¡¼¥×¤Ç¤Ï¡¢Á°¤Ç½Ò¤Ù¤¿¤è¤¦¤Ë¥³¥Ã¥×¤ò»ý¤Á¾å¤²¤ë¤¿¤á¤Ë2¤Ä¤Î¥â¡¼¥¿¤ò»ÈÍѤ·¤Æ¤¤¤ë¡£¤½¤Î¤¿¤á¡¢¥¢¡¼¥à¤¬¤È¤Æ¤â½Å¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¡£
¤½¤³¤Ç¡¢»äã¤Î¥°¥ë¡¼¥×¤Ï¾å¤Î²èÁü¤Î¤è¤¦¤Ë¡¢¥â¡¼¥¿¤È»õ¼Ö¤òÁȤ߹ç¤ï¤»¤ë¤³¤È¤Ç¥â¡¼¥¿¤ÎÎϤòºÇÂç¸Â¾å¤²¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤ò»ý¤Á¾å¤²¤ë¤³¤È¤¬¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
¡ü¥³¥Ã¥×¤òõ¤¹Ä¶²»ÇÈ¥»¥ó¥µ¤È°Üư¤Î¤¿¤á¤Î¸÷¥»¥ó¥µ
¡¡º£²ó¤Î²ÝÂê¤Ë¤Æ¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òõ¤¹¤¿¤á¤ËɬÍ×ÉԲķç¤Ê¤â¤Î¡¢¤½¤ì¤Ï¡ÖͲ»ÇÈ¥»¥ó¥µ¡×¤Ç¤¢¤ë¡£»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤ÏͲ»ÇÈ¥»¥ó¥µ¤È²óž³Ñ¤òÍøÍѤ¹¤ë¥â¡¼¥¿¤ÎÀ©¸æÊýË¡¤òÍѤ¤¤Æ¥³¥Ã¥×¤ÎÆþ¼ê¤ò¤è¤ê³Î¼Â¤Ê¤â¤Î¤È¤·¤¿¡£
&ref(2017b/Member/yuitom/Mission3/mission3_¥»¥ó¥µ.jpg,50%,¸÷¥»¥ó¥µ¤ÈͲ»ÇÈ¥»¥ó¥µ¤Î°ÌÃÖ´Ø·¸);
&ref(2017b/Member/yuitom/Mission3/mission3_¥»¥ó¥µ2.jpg,50%,¥¢¡¼¥à²¼¹ß»þ¤Î¸÷¥»¥ó¥µ¤Î°ÌÃÖ);
¡¡º£²ó¤Ï¡¢¾å¤Î¿Þ¤Î¤è¤¦¤ËͲ»ÇÈ¥»¥ó¥µ¤È¸÷¥»¥ó¥µ¤ò¼è¤êÉÕ¤±¤ë¤³¤È¤Ç¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òÆþ¼ê¡¢¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤è¤ê±¿È¤Ǥ¤ë¤È¹Í¤¨¤¿¡£
¼ÂºÝ¤Ë¥³¥Ã¥×¤Îõºº¥×¥í¥°¥é¥à¤ò»ÈÍѤ·»î¤·¤¿¤È¤³¤í¡¢¥¢¡¼¥à¤ÎÃæ¿´¤Ë²»ÇÈ¥»¥ó¥µ¡¼¤òÃÖ¤¯Á°¤ÈÈæ³Ó¤·¡¢¥³¥Ã¥×¤ÎÆþ¼ê¤ÎÀ®¸ùΨ¤ò³ÊÃʤ˾徺¤µ¤»¤ë¤³¤È¤ËÀ®¸ù¤·¤¿¡£
¡¡¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤Ä¤¤¤Æ¤Ï²¼¤Î¡Ö¡ü¥í¥Ü¥Ã¥È¤ò°Üư¤µ¤»¤ë¸÷¥»¥ó¥µ¡×¤Ë¤ÆÀâÌÀ¤¹¤ë¡£
**¥í¥Ü¥Ã¥È¤Î°Üư¼êÃʤηèÄê¡Ê¥Ý¥¤¥ó¥È£¡¢²ÝÂꤤβò·è¡Ë [#m42bda7b]
¡ü¥í¥Ü¥Ã¥È¤ò°Üư¤µ¤»¤ë¸÷¥»¥ó¥µ¡Ê¥Ý¥¤¥ó¥È£¡Ö°Üư¼êÃʡפβò·è¡Ë
¡¡º£²ó¡¢»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤Ï¥³¥Ã¥×¤òÆþ¼ê¡¦±¿È¤¹¤ë¤¿¤á¤Ë¡Ö²ÝÂê2¡×¤Ç»ÈÍѤ·¤¿¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î¥×¥í¥°¥é¥à¤ò´Êά²½¤·¤¿¥×¥í¥°¥é¥à¤òΩ¤Æ»ÈÍѤ·¤¿¡£¸÷¥»¥ó¥µ¤Î¼è¤êÉÕ¤±Êý¤Ë´Ø¤·¤Æ¤â¡¢Á°²ó¤Î¤â¤Î¤ò»²¹Í¤Ë¡ÖÃÏÌ̤ȿâľ¤Ë¡¢¤«¤ÄŬÀڤʵ÷Î¥¤À¤±ÃÏÌ̤ÈÏä·¤ÆÀßÃ֡פ¹¤ë¤³¤È¤Ç¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òÆþ¼ê¡¦±¿È¤¹¤ë¤³¤È¤ËÀ®¸ù¤·¤¿¡£
¡ü¥í¥Ü¥Ã¥È¤Î½ÅÎ̤ò»Ù¤¨¤ë4¤Ä¤Î¼ÖÎØ¡Ê²ÝÂꤡּÖÎØ¤òÁý¤ä¤¹¡×¤Î²ò·è¡Ë
&ref(2017b/Member/yuitom/Mission3/mission3_¼ÖÎØ.jpg,70%,4¤Ä¤Î¼ÖÎØ¤Î°ÌÃÖ);
¡¡¿Þ¤Î¤è¤¦¤Ëº£²ó¤Ï¶îÆ°ÎØ2ÎØ¡Ü¼«Í³¤Ë²óž¤¹¤ë¼ÖÎØ2ÎØ¤Ç½Å¤¤½ÅÎ̤ò»Ù¤¨¤Æ¤¤¤ë¡£¸åÎØ¤Î2¤Ä¤Î¼ÖÎØ¤¬¼«Í³¤Ë²óž¤¹¤ë¤¿¤á¡¢²óž»þ¤ËË໤¤Ë¤è¤êưºî¤¬¤ª¤«¤·¤¯¤Ê¤ë¤³¤È¤Ï̵¤«¤Ã¤¿¡£
¢¨¿Þ¤Ïµ¡ÂΤò΢¤«¤é¸«¤¿¤â¤Î¤Ç¤¢¤ë¡£
*Ãͤò´ÉÍý¤¹¤ë¤¿¤á¤ÎÄêµÁÉÕ¤± [#f3c69224]
**¥Þ¥¹¥¿¡¼¡Ê°Üư´ØÏ¢Ã´Åöµ¡ÂΡËÄêµÁÉÕ¤± [#ra4929f0]
¡ü¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î´ðËÜ¿ôÃÍ´ÉÍý
¡¡¥é¥¤¥ó¥È¥ì¡¼¥¹¤ò¹Ô¤¦¤Ë¤¢¤¿¤Ã¤ÆÉ¬ÍפȤʤäƤ¯¤ëÃͤò¤Þ¤È¤á¤Æ´ÉÍý¤·¡¢ÅÅÃÓ¾ÃÌפʤɤˤè¤Ã¤Æ¿ôÃͤËÊѹ¹¤¬À¸¤¸¤¿ºÝ¤ËÃͤòÊѤ¨¤ä¤¹¤¯¤·¤¿¡£
#define adjust Off(OUT_AB);Wait(50); // ÂÔµ¡»þ´Ö¡ÊÈùÄ´À°¡Ë
#define ultrasonic SensorUS(S1) //Ͳ»ÇÈ¥»¥ó¥µ¡¼
#define sensor_light SENSOR_2 // ¸÷¥»¥ó¥µ¡¼
#define black 30 // ¸÷¥»¥ó¥µ¡¼ºÇÄãÃÍ
#define white 60 // ¸÷¥»¥ó¥µ¡¼ºÇ¹âÃÏ
#define threshold (black+white)*1/2 // ´ð½àÀþ
#define deflection (sensor_light-threshold) // ¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î´ðËÜ·×»»¼°
¡¡¤³¤Î»þ¡¢adjust¤ÎÄêµÁÉÕ¤±¤Ë¤è¤ë0.05Éô֤ÎÂÔµ¡¤Ï¡¢¤½¤Î¸å¤Îưºî¤ò¤è¤êÀµ³Î¤Ë¹Ô¤¦¤¿¤á¤Ë¤Û¤Ü¤¹¤Ù¤Æ¤Î¥µ¥Ö¥ë¡¼¥Á¥ó¤ÎºÇ¸å¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¡£
¡ü¥³¥Ã¥×¤Îõº÷
¡¡¹ÖµÁÃæ¤ËÇÛÉÛ¤µ¤ì¤¿»ñÎÁ¤ò¸µ¤ËºîÀ®¤·¤¿¡£
¤³¤Î¥×¥í¥°¥é¥à¤Ï¡¢¥¿¥¤¥ä¤Î²óž³Ñ»ÈÍѤ·¤¿¥×¥í¥°¥é¥à¤Ë¤è¤êư¤¤¤Æ¤¤¤ë¤¿¤á¡¢¥¿¥¤¥ä¤Ë´Ø¤¹¤ë¾ðÊ󤬾ܤ·¤¯ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
const float diameter = 5.45; //¥¿¥¤¥ä¤Îľ·Â
const float track = 17.5; //¥¿¥¤¥ä¤Î¥È¥ì¥Ã¥ÉÉý
const float pi = 3.1415; //±ß¼þΨ
¡¡¤½¤ì¤¾¤ì¡¢¤³¤Î¿ôÃͤò¸µ¤ËÀµ³Î¤ÊÁ°¿Ê¸åÂब¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
**¥Þ¥¹¥¿¡¼¡Ê°Üư´ØÏ¢Ã´Åöµ¡ÂΡˤȥ¹¥ì¥¤¥Ö¡Ê¥¢¡¼¥à´ØÏ¢Ã´Åöµ¡ÂΡˤÎÄÌ¿® [#lb543d05]
¡¡º£²ó»äã¤Î¥°¥ë¡¼¥×¤Ç¤Ï2¤Ä¤Î¥í¥Ü¥Ã¥È¤ò1¤Ä¤Î¤â¤Î¤È¤·¤Æ»ÈÍѤ¹¤ë·Á¼°¤ò¤È¤Ã¤Æ¤¤¤ë¤¿¤á¡¢2¤Ä¤Îµ¡ÂΤÎÄÌ¿®¤¬É¬Í×ÉԲķç¤Ê¤â¤Î¤È¤Ê¤Ã¤Æ¤¯¤ë¡£¤½¤Î¤¿¤á¡¢¤½¤ì¤¾¤ì¤Î¾ðÊó¸ò´¹¤Î¤¿¤á¤Ë5¤Ä¤ÎÄêµÁÉÕ¤±¤ò¹Ô¤Ã¤¿¡£
#define cup_age_little 20 // »æ¥³¥Ã¥×¤ò¾¯¡¹¾å¤²¤ë
#define cup_age 30 // »æ¥³¥Ã¥×¾å¤²¤ë
#define cup_sage 40 // »æ¥³¥Ã¥×²¼¤²¤ë
#define cup_re 50 // »æ¥³¥Ã¥×»ý¤Áľ¤·ÈùÄ´À°
#define fin 9 // »Å»ö½ªÎ»Ï¢Íí
¥³¥Ã¥×¤Î»ý¤Áľ¤·¤Îưºî¤Ë´Ø¤·¤Æ¤Ï¡¢¥³¥Ã¥×¤¬µ¡ÂÎ¤Î°ÜÆ°»þ¤ËÀ¸¤¸¤ë¿¶Æ°¤Î¤¿¤á¤Ë¤º¤êÍî¤Á¤Æ¤¤Æ¤·¤Þ¤¦¤È¤¤¤¦ÌäÂê¤ò²ò·è¤¹¤ë¤¿¤á¤ËºîÀ®¤·¤¿¤â¤Î¤Ç¤¢¤ê¡¢¤³¤ì¤Ë¤è¤ê¥³¥Ã¥×¤¬¥º¥êÍî¤Á¤Æ¤·¤Þ¤¦¤³¤È¤òºÇÂç¸Â²ò¾Ã¤¹¤ë¤³¤È¤¬¤Ç¤¤¿¡£
¡¡¤Þ¤¿¡¢µ¡ÂΡʥޥ¹¥¿¡¼¤È¥¹¥ì¥¤¥Ö¡Ë¤È¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Î̾Á°¤Ë´Ø¤·¤Æ¤Ï¼¡¤Î¤è¤¦¤ËÄêµÁ¤·¤Æ¤¤¤ë¡£
#define master 0
#define slave 1
#define mail MAILBOX1
*¥µ¥Ö¥ë¡¼¥Á¥ó¤ÎÀâÌÀ [#r45912fd]
**¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤è¤ë°Üư¡Ê¥Ý¥¤¥ó¥È£¡Ö°Üư¼êÃʡפβò·è¡Ë [#i1aa8e55]
¡¡»äã¤Î¥°¥ë¡¼¥×¤Ç¤Ï¡¢¥³¥Ã¥×¤Îõº÷¡¦±¿È¤˥饤¥ó¥È¥ì¡¼¥¹¥×¥í¥°¥é¥à¤ò»ÈÍѤ·¤Æ¤¤¤ë¡£º£²ó¤Î¥é¥¤¥ó¥È¥ì¡¼¥¹¥×¥í¥°¥é¥à¤ÏÁ°²ó¤Î²ÝÂê¤Î¤è¤¦¤Ê¹â¤¤ÀºÅÙ¤ÏɬÍפʤ¤¤¿¤á¡¢ÈæÎãÀ©¸æ¼°¤Î3Ãʳ¬¥×¥í¥°¥é¥à¤ò»ÈÍѤ·¤Æ¤¤¤ë¡£
¡ü¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î¸µ¤È¤Ê¤ë´ðËܼ°¡Ê²ò·èºö¡¡¡Â®ÅÙ¤ÎÊѹ¹¡Ë
¡¡º£²ó¡¢ºîÀ®¤·¤¿¥é¥¤¥ó¥È¥ì¡¼¥¹ÍѤÎÈæÎãÀ©¸æ¥×¥í¥°¥é¥à¤ÏÈó¾ï¤Ë´Êñ¤Ê¤â¤Î¤È¤Ê¤Ã¤Æ¤¤¤ë¡£
¤Þ¤¿¡¢º£²ó¤Î²ÝÂê¤ò¥¯¥ê¥¢¤¹¤ë¤Ë¤¢¤¿¤Ã¤Æ¿Ê¹ÔÊý¸þ±¦Â¦¤Î¥é¥¤¥ó¤Èº¸Â¦¥é¥¤¥ó¤ò¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ëɬÍפ¬¤¢¤Ã¤¿¤¿¤á¡¢2¤Ä¤ÎÈæÎãÀ©¸æ¤Î¥µ¥Ö¥ë¡¼¥Á¥ó¤òºîÀ®¤·¤¿¡£
¡¡¤Þ¤¿¡¢linetrase_¡(int ¢)¤È¤·¤¿»þ¡¢¡¤Ï¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ë¥é¥¤¥ó¤òɽ¤·¡Êright¢ª±¦¡¢left¢ªº¸¡Ë¡¢¢¤ÏÈæÎãÀ©¸æ¤ÎÃʳ¬¤òɽ¤·¡¢¢¤ÎÃͤòÂ礤¯¤¹¤ë¤³¤È¤Ç¤è¤êµÞ¤Ê¥«¡¼¥Ö¤Ç¤â¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ë¡£
¡¡Îã¡Ë´Ë¤ä¤«¤Ê¥«¡¼¥Ö¤Î±¦Â¦¤Î¥é¥¤¥ó¤ò¥é¥¤¥ó¥È¥ì¡¼¥¹¢ª¡¡linetrase_right(1.5);
sub linetrase_right(int x) //¥é¥¤¥ó¥È¥ì¡¼¥¹´ðËÜ(¿Ê¹ÔÊý¸þ±¦Â¦)
{
OnFwd(OUT_A,40+deflection*x);
OnFwd(OUT_B,40-deflection*x);
}
sub linetrase_left(int x) // ¥é¥¤¥ó¥È¥ì¡¼¥¹´ðËÜ(¿Ê¹ÔÊý¸þº¸Â¦)
{
OnFwd(OUT_A,40-deflection*x);
OnFwd(OUT_B,40+deflection*x);
}
¤Þ¤¿¡¢Â®Å٤δð½à¤¬40¤ÈÈó¾ï¤Ë®¤¯ÀßÄꤵ¤ì¤Æ¤¤¤ëÍýͳ¤Ï¡Ö²ò·èºö¡¡¡Â®ÅÙ¤ÎÊѹ¹¡×¤Ë¤è¤ë¤¿¤á¤Ç¤¢¤ê¡¢¤³¤ì¤è¤ê²¼¤ÎÃͤȤʤë¤Èµ¡ÂΤνÅÎ̤δط¸¤ÇÁ°¿Ê¤·¤Ê¤¤²ÄǽÀ¤¬¹â¤¯¤Ê¤ë¤¿¤á¤Ç¤¢¤ë¡£
¡ü´Êñ¤ÊÈæÎãÀ©¸æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î¥×¥í¥°¥é¥à
¡¡º£²ó¤Ï¡¢Á°²ó¤Î²ÝÂê¤Ç»ÈÍѤ·¤¿¡Ö¥é¥¤¥ó¥È¥ì¡¼¥¹¸òº¹ÅÀ¼±Ê̥⡼¥É¡×¤Î¥×¥í¥°¥é¥à¤ò¤½¤Î¤Þ¤Þ»ÈÍѤ·¤Æ¤¤¤ë¡£¤³¤Î¥×¥í¥°¥é¥à¤Ç¤Î¸òº¹ÅÀ¼±ÊÌÊýË¡¤Ï¡¢»ØÄê»þ´Ö¶Ê¤¬¤ê³¤±¤Æ¤â´ð½àÀþ¤è¤ê¹õ¤¤Éôʬ¤«¤éÈ´¤±½Ð¤»¤Ê¤¤¾ì¹ç¤Ë¸òº¹ÅÀ¤Èǧ¼±¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
¡¡¤½¤·¤Æº£²ó¡¢¸òº¹ÅÀ¼±ÊÌ»þ´Ö¤Ï100¤ÈÈó¾ï¤Ëû¤¯ÀßÄꤵ¤ì¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢Â®ÅÙ´ð½à¤ò40¤ÈÈó¾ï¤Ë®¤¯ÀßÄꤷ¤Æ¤¤¤ë¤¿¤á¡¢¸òº¹ÅÀ¼±ÊÌ»þ´Ö¤òû¤¯¤·¤Ê¤±¤ì¤Ð¸òº¹ÅÀ¼±Ê̤»¤º¤ËÄ̤ê²á¤®¤Æ¤·¤Þ¤¦¤«¤é¤Ç¤¢¤ë¡£
¡¡¤Þ¤¿¡¢intertify_¡()¤È¤·¤¿¾ì¹ç¡¢¡¤Ï¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ë¥é¥¤¥ó¤òɽ¤·¤Æ¤¤¤ë¡£¡Êright¢ª±¦¡¢left¢ªº¸¡Ë
¡¡Îã¡Ë±¦Â¦¤Î¥é¥¤¥ó¤ò¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¸òº¹ÅÀ¼±Ê̡ˢª¡¡intertify_right();
sub intertify_right() //¸òº¹ÅÀ¼±Ê̥饤¥ó¥È¥ì¡¼¥¹(±¦Â¦)
{
long t = CurrentTick();
while(CurrentTick()-t<100){ // ¸òº¹ÅÀ¼±ÊÌ»þ´Ö¤Ï100ÉÃ
if(sensor_light>white-5){ // 55¤è¤ê¾å¡ÊÇò¤¤¡Ë¤Î¾ì¹ç¢ª»þ´Ö¥ê¥»¥Ã¥È
linetrase_right(1.5);
t = CurrentTick();
}else if(sensor_light>black+5){ // 35¤è¤ê¾å¡Ê¤ª¤è¤½´ð½àÀþ¡Ë¤Î¾ì¹ç¢ª»þ´Ö¥ê¥»¥Ã¥È
linetrase_right(1.5);
t = CurrentTick();
}else{ // ¤½¤ì°Ê³°¤Î¾ì¹ç¡Ê¹õÀþ¡Ë¤Î¾ì¹ç
linetrase_right(1.5);
}
}
adjust;
}
sub intertify_left() //¸òº¹ÅÀ¼±Ê̥饤¥ó¥È¥ì¡¼¥¹(¿Ê¹ÔÊý¸þº¸Â¦)
{
long t = CurrentTick();
while(CurrentTick()-t<100){ // ¸òº¹ÅÀ¼±ÊÌ»þ´Ö¤Ï100ÉÃ
if(sensor_light>white-5){ // 55¤è¤ê¾å¡ÊÇò¤¤¡Ë¤Î¾ì¹ç¢ª»þ´Ö¥ê¥»¥Ã¥È
linetrase_left(1.5);
t = CurrentTick();
}else if(sensor_light>black+5){ // 35¤è¤ê¾å¡Ê¤ª¤è¤½´ð½àÀþ¡Ë¤Î¾ì¹ç¢ª»þ´Ö¥ê¥»¥Ã¥È
linetrase_left(1.5);
t = CurrentTick();
}else{ // ¤½¤ì°Ê³°¤Î¾ì¹ç¡Ê¹õÀþ¡Ë¤Î¾ì¹ç
linetrase_left(1.5);
}
}
adjust;
}
**Ͳ»ÇÈ¥»¥ó¥µ¡¼¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¤ÈÆþ¼ê [#f5507a3f]
¡¡º£²ó¡¢ÇÛÉÛ¤µ¤ì¤¿»²¹Í»ñÎÁ¤ò´ð¤ËͲ»ÇÈ¥»¥ó¥µ¡¼¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¤ÈÆþ¼ê¤Î¥×¥í¥°¥é¥à¤òºîÀ®¤·¤¿¡£
Ͳ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷
¡¡¥³¥Ã¥×¤Þ¤ÇÀ᤹ܶ¤ë¥×¥í¥°¥é¥à¤È¡¢¥³¥Ã¥×¤òõºº¤¹¤ë¤¿¤á¤Ëµ¡ÂΤòº¸±¦¤ËÍɤ餹¥×¥í¥°¥é¥à¤Ç¤¢¤ë¡£
º£²ó¡¢»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤ÏÇÛÉÛ¤µ¤ì¤¿¤â¤Î°Ê³°¤Ë¡¢¥³¥Ã¥×¤ËÀܶᤷ¤¿¸å¡¢¤â¤È¤Ë°ÌÃ֤ޤǸåÂह¤ë¤È¤¤¤¦¥×¥í¥°¥é¥à¤òÄɲä·¤¿¡£
¤³¤ì¤Ë¤è¤ê¡¢¥³¥Ã¥×Æþ¼ê¸å¤Î¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ø¤ÎÉüµ¢¤¬³Î¼Â¤È¤Þ¤Ç¤Ï¤¤¤«¤Ê¤¯¤Æ¤â¡¢¤À¤¤¤¿¤¤¤Î³ÎΨ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¤ËÉüµ¢¤¹¤ë¤³¤È¤¬²Äǽ¤È¤Ê¤Ã¤¿¡£
void approach(float d) //µ÷Î¥dÁ°¿Ê
{
long angle = d/(diameter*pi)*360.0; //ɬÍפʎÀ޲ŽÔ¤Î²óž¿ô
RotateMotorEx(OUT_AB,50,angle,0,true,true);
adjust;
}
void back(float d) //µ÷Î¥d¸åÂà¡ÊÄÉ²Ã¥×¥í¥°¥é¥à¡Ë
{
long angle = d/(diameter*pi)*360.0; //ɬÍפʎÀ޲ŽÔ¤Î²óž¿ô
RotateMotorEx(OUT_AB,-50,angle,0,true,true);
adjust;
}
void spinAng(long ang) //³ÑÅÙangÅÙ¤ÎÀû²ó(»þ·×²ó¤ê)
{
long angle = track/diameter*ang; //ɬÍפʎÀ޲ŽÔ¤Î²óž¿ô
RotateMotorEx(OUT_AB,50,angle,100,true,true);
adjust;
}
void spinAng_opposite(long ang) //³ÑÅÙangÅÙ¤ÎÀû²ó(È¿»þ·×²ó¤ê)
{
long angle = track/diameter*ang; //ɬÍפʎÀ޲ŽÔ¤Î²óž¿ô
RotateMotorEx(OUT_AB,-50,angle,100,true,true);
adjust;
}
¡üͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷
¡¡¤³¤Î¥×¥í¥°¥é¥à¤ÏͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤Æ¡¢µ¡ÂΤòº¸±¦¤Ë¿¶¤ë¤³¤È¤Ç¾ã³²Êª¡Ê¥³¥Ã¥×¡Ë¤Þ¤Ç¤Îµ÷Î¥¤ò¬¤ê¡¢¾ã³²Êª¤Þ¤Ç¤Îµ÷Î¥¤¬ºÇ¤âû¤¤²óž³ÑÅÙ¤òµ²±¡¢¤½¤Î¸å¤½¤Î³ÑÅ٤˸þ¤¾ã³²Êª¤ËÀ᤹ܶ¤ë¤¿¤á¤ËɬÍפȤʤë¤â¤Î¤Ç¤¢¤ë¡£
¡¡¤Þ¤¿¡¢int search_distance(long ¡)¤È¤·¤¿¤È¤¡¢¡¤Ïõºº³ÑÅÙ¤òɽ¤¹¡£
¡¡Îã¡Ë120ÅÙ¤ÎÈϰϤǥ³¥Ã¥×¤òõ¤¹¡£¡Ê±¦¤Ë60ÅÙÀû²ó¡¢º¸¤Ë60ÅÙÀû²ó¡Ë¢ª¡¡search_distance(120);
int search_distance(long ang) // »æ¥³¥Ã¥×¤Îõº÷¡Êõºº³ÑÅÙ¡Ë
{
long tacho_min; //ºÇ¤â¶á¤¤µ÷Î¥¤ò¼Â¸½¤¹¤ëŽÀ޲ŽÔ¤Î²óž¿ô
int d_min = 300; //ºÇ¤â¶á¤¤µ÷Î¥¤Î²¾¤ÎºÇ¾®ÃÍ
long angle = (track/diameter)*ang; //Àû²ó³ÑÅÙ¤«¤éŽÀ޲ŽÔ¤Î²óž³Ñ¤ò·×»»
spinAng(ang/2); //»ØÄê³ÑÅÙ¤ÎȾʬÀû²ó(»þ·×²ó¤ê)
ResetTachoCount(OUT_AB); //³ÑÅÙ·×»»¤ò¥ê¥»¥Ã¥È
OnFwdSync(OUT_AB,50,-100);
while(MotorTachoCount(OUT_A)<=angle){
if(ultrasonic<d_min){
d_min = ultrasonic;
tacho_min = MotorTachoCount(OUT_A);
}
}
OnFwdSyncEx(OUT_AB,50,100,RESET_NONE); //»þ·×²ó¤ê¤ËÀû²ó
until(MotorTachoCount(OUT_A)<=tacho_min || ultrasonic<=d_min);
adjust;
Wait(500);
return d_min;
}
¡ý±þÍÑÊÔ¡Ö¸÷¥»¥ó¥µ¤òÍѤ¤¤¿¹õÀþõº÷¡×
¡¡¤³¤Î¥×¥í¥°¥é¥à¤Ï¡¢¼ÂºÝ¤Ë¤Ï»ÈÍѤµ¤ì¤ë¤³¤È¤¬¤Ê¤«¤Ã¤¿¤¬¡Ö¡üͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¡×¤ò±þÍѤ·¤ÆºîÀ®¤µ¤ì¤¿¤â¤Î¤Ç¤¢¤ë¡£ºîÀ®¤µ¤ì¤¿Íýͳ¤È¤·¤Æ¤Ï¡¢¥³¥Ã¥×Æþ¼ê¸å¤Ë¥é¥¤¥ó¥È¥ì¡¼¥¹¤ËÉüµ¢¤¹¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à¤Ç¤¢¤Ã¤¿¤¬¡¢¡ÖͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¡×¤Ë¤ÆÀâÌÀ¤·¤¿¸åÂह¤ë¥×¥í¥°¥é¥à¤¬´°À®¤·¤¿¤¿¤á¡¢É¬Íפ¬¤Ê¤¯¤Ê¤Ã¤¿¤«¤é¤Ç¤¢¤ë¡£
¡¡¤Þ¤¿¡¢ search_light_center(long ¡)¤È¤·¤¿¤È¤¡¢¡¤Ï¡Ö¡üͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¡×¤ÈƱÍͤËõºº³ÑÅÙ¤òɽ¤·¤Æ¤¤¤ë¡£
sub search_light_center(long ang) //¡¡¸½ºß¤ÎÊý¸þ¤òÃæ¿´¤ËangÅÙ¤ÎÈϰϤǹõÀþ¤ÎÃæ¿´¤ò¸þ¤¯
{
long tacho_min; //ºÇ¤â¶á¤¤µ÷Î¥¤ò¼Â¸½¤¹¤ëŽÀ޲ŽÔ¤Î²óž¿ô
int light_min = 300; //ºÇ¤â°Å¤¤ÌÀ¤ë¤µ¤Î²¾¤ÎºÇ¾®ÃÍ
long angle = (track/diameter)*ang; //Àû²ó³ÑÅÙ¤«¤éŽÀ޲ŽÔ¤Î²óž³Ñ¤ò·×»»
spinAng(ang/2); //»ØÄê³ÑÅÙ¤ÎȾʬÀû²ó(»þ·×²ó¤ê)
ResetTachoCount(OUT_AB); //³ÑÅÙ·×»»¤ò¥ê¥»¥Ã¥È
OnFwdSync(OUT_AB,50,-100);
while(MotorTachoCount(OUT_A)<=angle){
if(sensor_light<light_min){
light_min = sensor_light;
tacho_min = MotorTachoCount(OUT_A);
}
}
OnFwdSyncEx(OUT_AB,50,100,RESET_NONE); //»þ·×²ó¤ê¤ËÀû²ó
until(MotorTachoCount(OUT_A)<=tacho_min || sensor_light<=light_min);
adjust;
Wait(500);
}
**¥¢¡¼¥à¤ÎÁàºî [#y9d1707d]
¡¡»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤Ï¡¢¥¢¡¼¥à¤Ë2¤Ä¤Î¥â¡¼¥¿¤ò»ÈÍѤ·¤Æ¤¤¤ë¤¿¤á¾¯¡¹Æ°¤¤¬Ê£»¨¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£¤½¤Î¤¿¤á¡¢¥¢¡¼¥à¤Îư¤¤òÁ´¤Æ¥µ¥Ö¥ë¡¼¥Á¥ó¤È¤·¤Æ¤Þ¤È¤á¤ë¤³¤È¤Ç¡¢¤è¤ê°·¤¤¤ä¤¹¤¯¤·¤¿¡£
¡¡¤Þ¤¿¤½¤ÎºÝ¤Ë¡¢²óž³Ñ¤ò»ÈÍѤ¹¤ë¥â¡¼¥¿¤ÎÀ©¸æË¡¤òÍѤ¤¤ë¤³¤È¤Ç¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òÆþ¼ê¡¦±¿È¡¦¥ê¥ê¡¼¥¹¤Ç¤¤ë¤è¤¦¤Ë¤·¤¿¡£
¡ü¥¢¡¼¥àÀ©¸æ¥×¥í¥°¥é¥à¤Î»ÈÍÑË¡¤Ë¤Ä¤¤¤Æ
¡¡¡Ötukamu()¡×¢ª¡¡¥³¥Ã¥×¤ò¤Ä¤«¤àºÝ¤Ë»ÈÍÑ
¡¡¡Öhanasu()¡×¢ª¡¡¥³¥Ã¥×¤òÎ¥¤¹ºÝ¤Ë»ÈÍÑ
¡¡¡Öup_little()¡×¢ª¡¡¥³¥Ã¥×¤ò±¿È¡ʥԥó¥Ý¥ó¶Ì½ê»ý»þ¡Ë¤¹¤ëºÝ¤Ë»ÈÍÑ
¡¡¡Öageru()¡×¢ª¡¡¡Ê¥³¥Ã¥×½ê»ý»þ¡Ë¥Ô¥ó¥Ý¥ó¶Ì¤òÏÈÆâ¤ËÆþ¤ì¤ëºÝ¤Ë»ÈÍÑ
¡¡¡¡¡¡¡¡¡¡¡¡ ¢ª¡¡¡Ê¥³¥Ã¥×̤½ê»ý»þ¡Ë¥³¥Ã¥×¤Îõºº»þ¤Ë»ÈÍÑ
¡¡¡Ödown_little()¡×¢ª¡Öup_little()¡×»þ¤Ë¤º¤ì¤¿Ê¬¤ÎÄ´À°
¡¡¡Ösageru()¡×¢ª¡¡¥³¥Ã¥×¤òÆþ¼ê¤¹¤ëºÝ¤Ë»ÈÍÑ
¥¢¡¼¥à´ØÏ¢¤Î¥×¥í¥°¥é¥à¤ÏÂçÂΤ³¤Î¤è¤¦¤Ë»ÈÍѤ·¤Æ¤¤¤ë¡£
¾°¡¢¤½¤ì¤¾¤ì¤Î¥×¥í¥°¥é¥à¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
sub tukamu() //ÄϤà
{
RotateMotor(OUT_A,50,440);
adjust; //¤â¤È¤ÏOff(OUT_A);Wait(300);
}
sub hanasu() //Î¥¤¹
{
RotateMotor(OUT_A,50,-440);
adjust;
}
sub up_little() //¾¯¤·¾å¤²¤ë
{
RotateMotor(OUT_B,60,-180);
adjust;
}
sub ageru() //¾å¤²¤ë
{
RotateMotor(OUT_B,60,-720);
adjust;
}
sub down_little() //¤¹¤³¤·²¼¤²¤ë
{
RotateMotor(OUT_B,60,180);
adjust;
}
sub sageru() //²¼¤²¤ë
{
RotateMotor(OUT_B,60,720);
adjust;
}
**¤½¤Î¾¤Î¥µ¥Ö¥ë¡¼¥Á¥ó [#yef1d92f]
¡¡²ÝÂê¤ò»Ï¤á¤ë¤Ë¤¢¤¿¤Ã¤Æ¡¢¤Þ¤ºA¤ÎÏÈÆâ¤«¤éÈ´¤±½Ð¤µ¤Ê¤¤¤È¹Ô¤«¤Ê¤¤¡£¤½¤Î¤¿¤á¡¢°Ê²¼¤Î¤è¤¦¤Ê´Êñ¤Ê¥µ¥Ö¥ë¡¼¥Á¥ó¤òºîÀ®¤·¤¿¡£
sub escape_A() // A¤«¤é¤Îæ½Ð
{
while(sensor_light<white-5){
OnFwd(OUT_B,50);
OnFwd(OUT_A,30);
}
adjust;
}
*²ÝÂê¤Î¹¶Î¬ [#eb2b3c16]
**QSºîÀï¡Ê²ò·èºö¢¡Ö¥³¡¼¥¹¤ÎÊѹ¹¡×¡Ë [#w04f4faf]
¡¡»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤¬²ÝÂê¤ò¹¶Î¬¤¹¤ë¤Ë¤¢¤¿¤Ã¤Æ¡¢½ÅÍפȤʤë¤Î¤Ç¤Ï¤Ê¤¤¤«¤ÈȽÃǤ·¤¿Éôʬ¡¢¤½¤ì¤Ï¡Ö¥³¡¼¥¹Ãæ¤ÎQ¡ÁS´Ö¡×¤Ç¤¢¤ë¡£
»ä¤¿¤Á¤¬¡¢¤Ê¤¼¤³¤³¤ËÃíÌܤ·¤¿¤Î¤«¤È¤¤¤¦¤È¡¢µ¡ÂΤò¤³¤³¤Ë°Üư¤µ¤»¤ë¤³¤È¤Ç¤Û¤Ü¡Ö²óž¡×¤È¡Ö¥³¥Ã¥×¤Îõºº¡×¤Î2¤Ä¤Î´Êñ¤Êưºî¤Î¤ß¤Ç¡¢²ÝÂê¤ò¥¯¥ê¥¢¤Ç¤¤ë¤Î¤Ç¤Ï¤Ê¤¤¤«¤È¹Í¤¨¤¿¤«¤é¤Ç¤¢¤ë¡£
¡üQS¶è´Ö¤Ë¤¿¤É¤êÃ夯¤¿¤á¤Ë¡Ä
¡¡QS¶è´Ö¤Ë¤¿¤É¤êÃ夯¤Þ¤Ç¤Î´Ö¤ËÌäÂê¤È¤Ê¤Ã¤Æ¤¯¤ë¾ì½ê¡¢¤½¤ì¤Ï¡ÖPQ¶è´Ö¡×¤ò¤É¤Î¤è¤¦¤ËÄ̲᤹¤ë¤Î¤«¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£±ß¤Î³°¼þ¤ò¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ë¤¿¤á¤Ë¤Ï±ï¤ÎÆâÉô¤Ë¤¢¤ëÏȤ¬¼ÙËâ¤Ë¤Ê¤Ã¤Æ¤¤Æ¤·¤Þ¤¦¤³¤È¤¬¸¶°ø¤Ç¤¢¤ë¡£
¡¡¤½¤Î¤¿¤á¤Ë»ä¤¿¤Á¤Ï¡¢¡ÖͲ»ÇÈ¥»¥ó¥µ¡¼¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¤ÈÆþ¼ê¡×¤Ë¤Æ»ÈÍѤ·¤¿»ØÄê¤Îµ÷Î¥Á°¿Ê¤¹¤ë¤È¤¤¤¦¥×¥í¥°¥é¥à¤òÍѤ¤¤Æ¡¢¶¯°ú¤Ë±ß¤Î¿¿¤óÃæ¤òÆÍ¤ÃÀڤäƤ·¤Þ¤ª¤¦¤È¤¤¤¦ºîÀï¤ò¹Í¤¨¤¿¡£
intertify_right(); // B¢ªP¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹
spinAng(10); // P¤Ë¤Æ¿ÊϩĴÀ°
approach(30); // P¢ªQ
while(sensor_light>black+5){ // Q¡ÁS´Ö¤Ë¤Æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤ËÉüµ¢¡
OnFwd(OUT_A,50);
}
adjust;
while(sensor_light<white-5){ // Q¡ÁS´Ö¤Ë¤Æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤ËÉüµ¢¢
OnFwd(OUT_B,50);
}
adjust;
intertify_right(); // S¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¸òº¹ÅÀ¼±ÊÌ¡Ë
¡¡¤Þ¤¿¤³¤Î»þ¡¢ approach(30);¤È¤·¤Æ¤¤¤ë¤¬¤³¤ì¤Ï¿ô²ó»î¤·¤¿·ë²Ì¤³¤Î¿ôÃͤ¬ºÇ¤âŬ¤·¤Æ¤¤¤ë¤ÈȽÃǤ·¤¿¤¿¤á¤Ç¤¢¤ë¡£
**¥¹¥ì¥¤¥Ö¡Ê¥¢¡¼¥à´ØÏ¢Ã´Åöµ¡ÂÎ¡Ë¤Î¥×¥í¥°¥é¥à [#ufd00b3d]
¡¡º£²ó¡¢²ÝÂê¤ò¥¯¥ê¥¢¤¹¤ë¤Ë¤¢¤¿¤Ã¤ÆÉ¬ÍפȤʤäƤ¯¤ë¤â¤Î¤¬¡¢¥³¥Ã¥×¤ò¤É¤Î¤è¤¦¤Ë±¿È¤¹¤ë¤«¤Ç¤¢¤ë¡£ÆÃ¤Ë»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤Ï¥³¥Ã¥×¤ò»ý¤Ã¤¿¤Þ¤ÞÏȤò¾è¤ê±Û¤¨¤ë¤È¤¤¤¦¥³¡¼¥¹¤òÄ̲᤹¤ë¡£¤½¤Î¤¿¤á¤Ë¤Ï¡¢»æ¥³¥Ã¥×¤¬ÏȤ˰ú¤Ã¤«¤«¤ë¤³¤È¤¬¤Ê¤¤¤è¤¦¤Ë»æ¥³¥Ã¥×¤ò¼ã´³É⤫¤»¤ëɬÍפ¬¤¢¤ë¡£
¡¡¤·¤«¤·¡¢¤³¤³¤Ç»æ¥³¥Ã¥×¤òÉ⤫¤Ð¤»¤¹¤®¤ë¤È¼¡¤ÏÃæ¤Ë¤¢¤ë¥Ô¥ó¥Ý¥ó¶Ì¤¬³°¤Ø½Ð¤Æ¤·¤Þ¤¦¡£¤½¤Î¤¿¤á¡¢»ä¤¿¤Á¤Ï¤Á¤ç¤¦¤É¥Ô¥ó¥Ý¥ó¶Ì¤¬³°¤Ø½Ð¤Ê¤¤¤è¤¦¤Ê¹â¤µ¤Îʬ¤À¤±¥³¥Ã¥×¤ò¾å¤Ë¤¢¤²¡¢¥³¥Ã¥×¤ò»ý¤Ã¤¿¤Þ¤ÞÏȤò¾è¤ê±Û¤¨¤ë¤È¤¤¤¦ÊýË¡¤ò¹Ô¤¦¤³¤È¤Ë¤·¤¿¡£
¡¡²¼¤Î¿Þ¤Ï¡Ö up_little() // ¥³¥Ã¥×¤ò¾¯¤·¾å¤²¤ë¡×¤ò¤·¤¿¸å¤Î¥³¥Ã¥×¡¢¥í¥Ü¥Ã¥È¤Î¾õÂ֤Ǥ¢¤ë¡£
&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à3.jpg,50%,¥³¥Ã¥×±¿È»þ¤Î¥³¥Ã¥×¤Î¾õÂÖ);
task main()
{
int msg1; // »æ¥³¥Ã¥×¤ò¾¯¤·¾å¤²¤ë
until(msg1==cup_age_little)
ReceiveRemoteNumber(mail,true,msg1);
while(msg1==cup_age_little){
sageru();
tukamu();
up_little();
SendResponseNumber(mail,fin);
Wait(500);
msg1 = "";
}
int msg2; // »æ¥³¥Ã¥×¤ò»ý¤Áľ¤¹
until(msg2==cup_re)
ReceiveRemoteNumber(mail,true,msg2);
while(msg2==cup_re){
down_little();
hanasu();
tukamu();
up_little();
SendResponseNumber(mail,fin);
Wait(500);
msg2 = "";
}
¡¡
int msg3; // »æ¥³¥Ã¥×¤ò¾å¤²¤ë
until(msg3==cup_age)
ReceiveRemoteNumber(mail,true,msg3);
while(msg3==cup_age){
down_little();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg3 = "";
}
int msg4; // »æ¥³¥Ã¥×¤òÃÖ¤¯
until(msg4==cup_sage)
ReceiveRemoteNumber(mail,true,msg4);
while(msg4==cup_sage){
sageru();
hanasu();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg4 = "";
}
int msg5; // 2È֤λ楳¥Ã¥×¤ò¾¯¤·¾å¤²¤ë
until(msg5==cup_age_little)
ReceiveRemoteNumber(mail,true,msg1);
while(msg5==cup_age_little){
sageru();
tukamu();
up_little();
SendResponseNumber(mail,fin);
Wait(500);
msg5 = "";
}
int msg6; // »æ¥³¥Ã¥×¤ò¾å¤²¤ë
until(msg6==cup_age)
ReceiveRemoteNumber(mail,true,msg6);
while(msg6==cup_age){
down_little();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg6 = "";
}
int msg7; // »æ¥³¥Ã¥×¤òÃÖ¤¯
until(msg7==cup_sage)
ReceiveRemoteNumber(mail,true,msg7);
while(msg7==cup_sage){
sageru();
hanasu();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg7 = "";
}
int msg8; // 3È֤λ楳¥Ã¥×¾¯¤·¾å¤²¤ë
until(msg8==cup_age_little)
ReceiveRemoteNumber(mail,true,msg1);
while(msg8==cup_age_little){
sageru();
tukamu();
up_little();
SendResponseNumber(mail,fin);
Wait(500);
msg8 = "";
}
int msg9; // »æ¥³¥Ã¥×¤ò¾å¤²¤ë
until(msg9==cup_age)
ReceiveRemoteNumber(mail,true,msg9);
while(msg9==cup_age){
down_little();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg9 = "";
}
int msg10; // »æ¥³¥Ã¥×¤òÃÖ¤¯
until(msg10==cup_sage)
ReceiveRemoteNumber(mail,true,msg10);
while(msg10==cup_sage){
sageru();
hanasu();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg10 = "";
}
}
¡¡¤Þ¤¿¡¢ÅÓÃæ¤Ë¤¢¤ë¥³¥Ã¥×¤Î»ý¤Áľ¤·¤Ë´Ø¤·¤Æ¤Ï¥³¥Ã¥×¤¬µ¡ÂÎ¤Î°ÜÆ°»þ¤ËÀ¸¤¸¤ë¿¶Æ°¤Î¤¿¤á¤Ë¤º¤êÍî¤Á¤Æ¤¤Æ¤·¤Þ¤¦¤È¤¤¤¦ÌäÂê¤ò²ò·è¤¹¤ë¤¿¤á¤ËºîÀ®¤·¤¿¤â¤Î¤Ç¤¢¤ê¡¢¤³¤ì¤Ë¤è¤ê¥³¥Ã¥×¤¬¥º¥êÍî¤Á¤Æ¤·¤Þ¤¦¤³¤È¤òºÇÂç¸Â²ò¾Ã¤¹¤ë¤³¤È¤¬¤Ç¤¤¿¡£
**¥Þ¥¹¥¿¡¼¡Ê°Üư´ØÏ¢Ã´Åöµ¡ÂÎ¡Ë¤Î¥×¥í¥°¥é¥à [#f3fd9950]
&ref(2017b/Member/yuitom/Mission3/mission3_map.jpg,50%,¥í¥Ü¥Ã¥È¤Îư¤Êý);
¡¡º£²ó¡¢¿Þ¤Î¤è¤¦¤Ê·Á¤Ç²ÝÂê¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤¤¿¤¤¤È¹Í¤¨¤Æ¤¤¤ë¡£
ÂçÂΤÎή¤ì¤È¤·¤Æ¤Ï
¡¡¡ÖA¤ò¥¹¥¿¡¼¥È¡×¢ª¡ÖB¤«¤é¥³¥Ã¥×¡¤Îõº÷¡¦Æþ¼ê¡×¢ª¡ÖB¤ËÌá¤ë¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×¢ª¡ÖB¢ªP¤Ø°Üư¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×
¡¡¢ª¡ÖP¢ªS¤Ø°Üư¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×¢ª¡ÖSQ´Ö¤Ë¤ÆU¥¿¡¼¥ó¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×¢ª¡ÖP¢ªS¤Ø°Üư¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×
¡¡¢ª¡ÖS¤Ë¤Æ¥Ô¥ó¥Ý¥ó¶Ì¥ê¥ê¡¼¥¹¡×¢ª¡ÖSQ´Ö¤Ë¤ÆU¥¿¡¼¥ó¡Ê»æ¥³¥Ã¥×½ê»ý¡Ë¡×¢ª¡ÖY¤Ë»æ¥³¥Ã¥×¤ò¥ê¥ê¡¼¥¹¡×
¡¡¢ª¡ÖS¤Ë¤Æ±¦²ó¤êÀû²ó¡×¢ª¡Ö¥³¥Ã¥×¢¤Îõº÷¡¦Æþ¼ê¡×¢ª¡Ö¸µ¤Î°ÌÃÖ¤ØÌá¤ë¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×¢ª¡ÖQS´Ö¤ËÉüµ¢¤¹¤ë¤Þ¤Ç¸«¤¤²ó¤êÀû²ó¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×
¡¡¢ª¡ÖS¤Ë¤Æ¥Ô¥ó¥Ý¥ó¶Ì¥ê¥ê¡¼¥¹¡×¢ª¡ÖSQ´Ö¤Ë¤ÆU¥¿¡¼¥ó¡Ê»æ¥³¥Ã¥×½ê»ý¡Ë¡×¢ª¡ÖY¤Ë»æ¥³¥Ã¥×¤ò¥ê¥ê¡¼¥¹¡×
¡¡¢ªÆ±Íͤ˥³¥Ã¥×£¤âÆþ¼ê¡¦¥Ô¥ó¥Ý¥ó¶Ì¡¢»æ¥³¥Ã¥×¤ò¥ê¥ê¡¼¥¹¢ª¡¡½ªÎ»
¤È¤¤¤¦Î®¤ì¤Ç²ÝÂê¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤³¤¦¤È»×¤¦¡£
¢¨¸å¤Î¡Öɾ²Á¡×¤Ç¤âµ½Ò¤·¤Æ¤¤¤ë¤¬¡¢º£²ó¤Ï¥³¥Ã¥×¤ò½Å¤Í¤ëưºî¤Ë¤Ä¤¤¤Æ¤Î¥×¥í¥°¥é¥à¤Ï¹Í¤¨¤Æ¤¤¤Ê¤¤¡£
¡¡º£²ó¡¢Ãí°Õ¤·¤¿¤³¤È¤È¤¹¤ë¤ÈÁ°²ó¤Î²ÝÂê¤ÈƱ¤¸¤è¤¦¤ËÅÅÃÓ¾ÃÌפˤè¤Ã¤Æ²ÝÂê¤ÎÀ®¸ùΨ¤¬º¸±¦¤µ¤ì¤Ê¤¤¥×¥í¥°¥é¥à¤ÎºîÀ®¤Ç¤¢¤ë¡£¤³¤ì¤Ë¤è¤ê¡¢²ÝÂê¤ÎÀ®¸ùΨ¤Ï¡ÊÅÓÃæ¤Þ¤Ç¤Ç¤Ï¤¢¤ë¤¬¡Ä¡Ë¾¯¤·¤Ï¾å¤¬¤Ã¤¿¤Î¤Ç¤Ï¤Ê¤¤¤«¤È»ä¤Ï¹Í¤¨¤Æ¤¤¤ë¡£
°Ê²¼¤¬¡¢º£²ó¤Îȯɽ²ñ¤Ë¤Æ»ÈÍѤ·¤¿¥×¥í¥°¥é¥à¤Ç¤¢¤ë¡£
task main()
{
SetSensorLowspeed(S1);
SetSensorLight(S2);
escape_A(); // A¤«¤éÈ´¤±½Ð¤¹
intertify_right(); // BÃÏÅÀ¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¸òº¹ÅÀ¼±Ê̥⡼¥É
int d1 = search_distance(90); // BÃÏÅÀ¤Ë¤Æ90ÅÙ¤ÎÈϰϤǥ³¥Ã¥×õº÷
if(d1>10){
approach(d1-5); // ¥³¥Ã¥×¤Î5cmÁ°¤Þ¤ÇÁ°¿Ê
}
int msg1; // ÄÌ¿®(£±È֤λ楳¥Ã¥×¤ò¾¯¤·¾å¤²¤ë)
while(msg1!=fin){
ReceiveRemoteNumber(mail,true,msg1);
SendRemoteNumber(slave,mail,cup_age_little);
}
back(d1-5); // Á°¿Êʬ¤À¤±¸åÂà¡ÊBÃÏÅÀ¤Þ¤ÇÌá¤ë¡Ë
spinAng(80); // B¤Ë¤ÆPÊýÌ̤ر¦Àû²ó
while(sensor_light>black+5){ // BP¶è´Ö¥é¥¤¥ó¥È¥ì¡¼¥¹Éüµ¢½àÈ÷¡
OnFwdSync(OUT_AB,50,0);
}
adjust;
while(sensor_light<white-5){ // BP¶è´Ö¥é¥¤¥ó¥È¥ì¡¼¥¹Éüµ¢½àÈ÷¢
OnFwd(OUT_B,50);
}
adjust;
intertify_right(); // B¢ªP¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¸òº¹ÅÀ¼±ÊÌ¡Ë
spinAng(10); // P¤Ë¤Æ¿ÊϩĴÀ°
approach(30); // P¢ªQ¤Þ¤ÇÁ°¿Ê¡ÊX¤ÎÏȤò¾è¤ê±Û¤¨¤ë¡Ë
while(sensor_light>black+5){ // QS¶è´Ö¥é¥¤¥ó¥È¥ì¡¼¥¹Éüµ¢½àÈ÷¡
OnFwd(OUT_A,50);
}
adjust;
while(sensor_light<white-5){ // QS¶è´Ö¥é¥¤¥ó¥È¥ì¡¼¥¹Éüµ¢½àÈ÷¢
OnFwd(OUT_B,50);
}
adjust;
intertify_right(); // Q¢ªS¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¸òº¹ÅÀ¼±ÊÌ¡Ë
spinAng(90); // S¤Ë¤Æ±¦Àû²ó¡ÊX¤Ø¸þ¤¯¡¡Ë
int msg2; // ÄÌ¿®(»æ¥³¥Ã¥×»ý¤Áľ¤¹)
while(msg2!=fin){
ReceiveRemoteNumber(mail,true,msg2);
SendRemoteNumber(slave,mail,cup_re);
}
while(sensor_light>black+5){ // S¤Ë¤Æ±¦Àû²ó¡ÊX¤Ø¸þ¤¯¢¡Ë
OnFwdSync(OUT_AB,50,100);
}
adjust;
while(sensor_light<white-5){
OnFwd(OUT_A,50);
}
adjust;
intertify_left(); // S¢ªQÊý¸þ¤Ø¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¥Ô¥ó¥Ý¥ó¶Ì¤òXÏÈÆâ¤Ø¡Ë
int msg3; // ÄÌ¿®(»æ¥³¥Ã¥×¤ò¾å¤²¤ë)
while(msg3!=fin){
ReceiveRemoteNumber(mail,true,msg3);
SendRemoteNumber(slave,mail,cup_age);
}
adjust;
spinAng(320); // Y¤ÎÊý¸þ¤Ë¸þ¤¯
¡¡// ËÜÈ֤Ϥ³¤³¤Ç½ªÎ» //
while(sensor_light>black+5){
OnFwdSync(OUT_AB,50,0);
}
adjust;
int msg4; // ÄÌ¿®(»æ¥³¥Ã¥×¤òÃÖ¤¯)
while(msg4!=fin){
ReceiveRemoteNumber(mail,true,msg4);
SendRemoteNumber(slave,mail,cup_sage);
}
adjust;
¡¡// Îý½¬¤Ç¤Ï¤³¤³¤Ç½ªÎ» //
spinAng(90); // 2È֤λ楳¥Ã¥×¤ÎÊý¸þ¤Ë¸þ¤¯
int d2 = search_distance(90); // 90ÅÙ¤ÎÈϰϤǥ³¥Ã¥×õº÷
if(d2>10){
approach(d2-5); // ¥³¥Ã¥×¤Î5cmÁ°¤Þ¤ÇÁ°¿Ê
}
int msg5; // ÄÌ¿®(2È֤λ楳¥Ã¥×¤ò¾¯¤·¾å¤²¤ë)
while(msg5!=fin){
ReceiveRemoteNumber(mail,true,msg5);
SendRemoteNumber(slave,mail,cup_age_little);
back(d2-5); // Á°¿Êʬ¤À¤±¸åÂà¡Ê¸µ¤Î°ÌÃÖ¤ØÌá¤ë¡Ë
while(sensor_light>black+5){ // X¤ÎÊý¸þ¤Ø¸þ¤¯
OnFwdSync(OUT_AB,50,100);
}
adjust;
while(sensor_light<white-5){
OnFwd(OUT_A,50);
}
adjust;
intertify_left(); // S¢ªQÊý¸þ¤Ø¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¥Ô¥ó¥Ý¥ó¶Ì¤òXÏÈÆâ¤Ø¡Ë
int msg6; // ÄÌ¿®(»æ¥³¥Ã¥×¤ò¾å¤²¤ë)
while(msg6!=fin){
ReceiveRemoteNumber(mail,true,msg6);
SendRemoteNumber(slave,mail,cup_age);
}
adjust;
spinAng(320); // Y¤ÎÊý¤Ë¸þ¤¯
while(sensor_light>black+5){
OnFwdSync(OUT_AB,50,0);
}
adjust;
int msg7; // ÄÌ¿®(»æ¥³¥Ã¥×¤òÃÖ¤¯)
while(msg7!=fin){
ReceiveRemoteNumber(mail,true,msg7);
SendRemoteNumber(slave,mail,cup_sage);
}
spinAng_opposite(90); // 3È֤λ楳¥Ã¥×¤ÎÊý¤Ë¸þ¤¯
int d3 = search_distance(90); // 90ÅÙ¤ÎÈϰϤǥ³¥Ã¥×õº÷
if(d3>10){
approach(d3-5); // ¥³¥Ã¥×¤Î5cmÁ°¤Þ¤ÇÁ°¿Ê
}
int msg8; // ÄÌ¿®(3È֤λ楳¥Ã¥×¤ò¾¯¤·¾å¤²¤ë)
while(msg8!=fin){
ReceiveRemoteNumber(mail,true,msg8);
SendRemoteNumber(slave,mail,cup_age_little);
}
back(d3-5); // Á°¿Êʬ¤À¤±¸åÂà¡Ê¸µ¤Î°ÌÃÖ¤ØÌá¤ë¡Ë
while(sensor_light>black+5){ // X¤ÎÊý¤Ë¸þ¤¯
OnFwdSync(OUT_AB,-50,100);
}
adjust;
intertify_right(); // S¢ªQÊý¸þ¤Ø¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¥Ô¥ó¥Ý¥ó¶Ì¤òXÏÈÆâ¤Ø¡Ë
int msg9; // ÄÌ¿®(»æ¥³¥Ã¥×¤ò¾å¤²¤ë)
while(msg9!=fin){
ReceiveRemoteNumber(mail,true,msg9);
SendRemoteNumber(slave,mail,cup_age);
}
adjust;
spinAng(320); // Y¤ÎÊý¸þ¤Ë¸þ¤¯
while(sensor_light>black+5){
OnFwdSync(OUT_AB,50,0);
}
adjust;
int msg10; // ÄÌ¿®(»æ¥³¥Ã¥×¤òÃÖ¤¯)
while(msg10!=fin){
ReceiveRemoteNumber(mail,true,msg10);
SendRemoteNumber(slave,mail,cup_sage);
}
}
¡üɾ²Á
¡¡¡Ö¥Ô¥ó¥Ý¥ó¶Ì¢ª¡¡2¤Ä¡¢¥³¥Ã¥×¢ª¡¡0¡¡ÆÀÅÀ¡Ä4ÅÀ¡×
¡¡º£²ó¤Ï»þ´Ö¤¬Â¤ê¤º¡¢Èó¾ï¤Ë²ù¤·¤¤·ë²Ì¤È¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£
-¸¶°ø¤È»×¤ï¤ì¤ëÌäÂêÅÀ
¡¡ÌäÂêÅÀ¡¡¡¡Ö²ò·èºö¢¡¡¥³¡¼¥¹¤ÎÊѹ¹¡×¤ÎµÍ¤á¤Î´Å¤µ
¢ª¡¡X¤ÎÏȤò¶¯°ú¤ËÄ̲᤹¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢Ä¶²»ÇÈ¥»¥ó¥µ¤òÍøÍѤ·Â¾¤Î¥³¥Ã¥×¤ò¤¦¤Þ¤¯»ÈÍѤ¹¤ë¤³¤È¤Ç¤â¤Ã¤È³Î¼Â¤Ê¥³¥Ã¥×¤ÎÍ¢Á÷¤¬¤Ç¤¤¿¤Î¤Ç¤Ï¤Ê¤¤¤«¤È¹Í¤¨¤ë¡£
¡¡ÌäÂêÅÀ¢¡¡¥×¥í¥°¥é¥ß¥ó¥°¤ÎĹʸ²½
¢ª¡¡º£²ó¤Ï¤Û¤È¤ó¤É¥°¥ë¡¼¥×¤Î°ì¿Í¤ËǤ¤»¤ë·Á¤È¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¤Î¤À¤¬¡¢¤½¤Î¥×¥í¥°¥é¥à¤ò¥°¥ë¡¼¥×Æâ¤Ç¤µ¤é¤Ë¶¦Í¡¦²þÁ±¤¹¤ë¤³¤È¤Ë¤è¤ê¹¹¤Ë¡¢¥×¥í¥°¥é¥ß¥ó¥°¤òû¤¯¡¦²þÁ±¤·¤ä¤¹¤¯¤Ç¤¤¿¤È¹Í¤¨¤é¤ì¤ë¡£
¡¡ÌäÂêÅÀ£¡¡¡Ö²ò·èºö£¡¡µ¡ÂΤηÚÎ̲½¡×¤Î̤²ò·è
¢ª¡¡º£²ó»þ´Ö¤Î´Ø·¸¤Ç¡¢µ¡ÂΤβþÎɤ˻þ´Ö¤ò³ä¤¯¤³¤È¤¬¤Ç¤¤Ê¤«¤Ã¤¿¡£¤½¤Î¤¿¤á¤ËÌÀ¤é¤«¤Ë½ÅÎÌ¥ª¡¼¥Ð¡¼¤Êµ¡ÂΤÇËÜÈÖ¤ò·Þ¤¨¤Æ¤·¤Þ¤Ã¤¿¤Î¤À¤¬¡¢¤â¤Ã¤È²þÎɤ·¡¢·ÚÎ̲½¡¦µ¡¹½¤Î´Êά²½¤¬¤Ç¤¤¿¤Î¤Ç¤Ï¤Ê¤¤¤«¤È¹Í¤¨¤Æ¤¤¤ë¡£
¡¡ÌäÂêÅÀ¤¡¡¥³¥Ã¥×¤ò½Å¤Í¤ë¤³¤È¤ÎÃÇǰ
¢ª¡¡º£²ó»þ´Ö¤Î´Ø·¸¤Ç¡¢¥³¥Ã¥×¤ò½Å¤Í¤ë¤È¤¤¤¦Æ°ºî¤Þ¤Ç¤ËÃå¼ê¤Ç¤¤Ê¤«¤Ã¤¿¡£¤½¤â¤½¤â¤½¤³¤Þ¤Çưºî¤¬À®¸ù¤·¤Ê¤«¤Ã¤¿¤Î¤Ç¤¢¤ë¤¬¡¢¤ä¤Ï¤ê¥×¥í¥°¥é¥à¤¬Ì¤´°¤Î¤Þ¤ÞËÜÈÖ¤ËÄ©¤à¤³¤È¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¤Î¤Ï¤È¤Æ¤â²ù¤·¤«¤Ã¤¿¡£¤ª¤½¤é¤¯¡¢Ä¶²»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤ë¤³¤È¤Ç¥³¥Ã¥×¤ò½Å¤Í¤ëưºî¤òÀ®¸ù¤µ¤»¤ë¤³¤È¤¬²Äǽ¤Ç¤¢¤Ã¤¿¤È¹Í¤¨¤Æ¤¤¤ë¡£
*¤Þ¤È¤á [#y672585d]
**²ÝÂê3¤Ë´Ø¤·¤Æ [#v0ace856]
¡¡º£²ó¤Ï¡¢»þ´Ö¤Î´Ø·¸¤Ç´°À®Å٤ι⤤¥í¥Ü¥Ã¥È¡¢¥×¥í¥°¥é¥à¤òºîÀ®¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤«¤Ã¤¿¡£¤Þ¤¿¡¢²ÝÂê¤ÎÀ®¸ùΨ¤Ë´Ø¤·¤Æ¤â¤¢¤Þ¤ê¹â¤¤¤â¤Î¤È¤¤¤¨¤ë¤â¤Î¤òºîÀ®¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤«¤Ã¤¿¡£
¡¡¤·¤«¤·¡¢¥í¥Ü¥Ã¥È¤Ï¤¢¤¯¤Þ¤Ç¤â¥×¥í¥°¥é¥à¤Ë½¾¤Ã¤ÆÆ°¤¤¤Æ¤¯¤ì¤¿¤Þ¤Ç¤Ç¤¢¤ê¡¢´°À®ÅÙ¤¬¹â¤¯¤Ê¤¤¤È¤¤¤Ã¤Æ¤â¡¢º£²ó¤Î²ÝÂê¤ò´°Á´¤Ë¤³¤Ê¤»¤ë¥ì¥Ù¥ë¤Î¥í¥Ü¥Ã¥È¤Ë¤Ï¤Ê¤Ã¤Æ¤¤¤¿¤Ï¤º¤Ê¤Î¤Ç¡¢¤¢¤È¤Ï»ä¤¿¤Á¤¬¤É¤ì¤Û¤É¡¢¥×¥í¥°¥é¥ß¥ó¥°¤ò¹©ÉפǤ¤ë¤«¡¢²þÎɤǤ¤ë¤«¤Ë²ÝÂê¤ÎÀ®¸ù¤¬Ä¾ÀÜ´Ø·¸¤·¤Æ¤¤¤¿¤È¹Í¤¨¤ë¡£¤ª¤½¤é¤¯¡¢Á´¥°¥ë¡¼¥×¤¬¹Í¤¨¤Æ¤¤¤ë¤³¤È¤Ç¤¢¤ë¤È»×¤¦¤¬¡¢¤â¤¦¾¯¤·¤Î»þ´Ö¤¬¤¢¤ì¤Ð²ÝÂê¤ò¥¯¥ê¥¢¤Ç¤¤ë¤È¹Í¤¨¤Æ¤¤¤ë¡£¤½¤Î¤¿¤á¡¢º£²ó¤Î²ÝÂê¤Ï;·×¤Ë²ù¤·¤¤·ë²Ì¤È¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£¡¡
**Á´ÂΤòÄ̤·¤Æ [#d2956049]
¡¡¤³¤Î¥¼¥ß¤òÄ̤·¤Æ»ä¤Ï¡¢¼«Ê¬¤¬º£¤Þ¤Ç´°àú¤Ê¸ºß¤À¤È¹Í¤¨¤Æ¤¤¤¿¥í¥Ü¥Ã¥È¤¬¤¤¤«¤ËÊ£»¨¤Ê¥×¥í¥°¥é¥àư¤¤¤Æ¤¤¤ë¤«¡¢¾°³î¤Ä»ÔÈΤΥí¥Ü¥Ã¥È¤¬¤¤¤«¤ËÀöÎý¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤Ê¤Î¤«¡¢¤È¤¤¤¦¤³¤È¤ò¿È¤ËÝî¤ß¤ÆÂà´±¤¹¤ë¤³¤È¤¬¤Ç¤¤¿¡£
¡¡»ä¤¿¤Á¤¬º£²ó°·¤Ã¤Æ¤¤¿¥í¥Ü¥Ã¥È¤Ï¡¢¤È¤Æ¤â´Êñ¤Ê¤Ä¤¯¤ê¤Ç¤¢¤ë¡£¤·¤«¤·¡¢¤½¤Î´Êñ¤Ê¥í¥Ü¥Ã¥È¤òư¤«¤¹¤¿¤á¤ËŤ¤»þ´Ö¤ÈÄ´Àá¤È²þÎɤò¹Ô¤¤¡¢¤è¤¦¤ä¤¯¾¯¤·¤Ï¤Þ¤È¤â¤Êư¤¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£´Êñ¤Ê¥â¡¼¥¿¤È¥»¥ó¥µ¤òÍѤ¤¤Æ¤â¤³¤ì¤À¤±¤ÎÆñ°×Å٤Ǥ¢¤ë¤«¤é¡¢¤ª¤½¤é¤¯»ÔÈΤÎÊ£»¨¤Ê¥í¥Ü¥Ã¥È¤Ï¤µ¤é¤Ë¤½¤Î²¿½½ÇܤâÆñ¤·¤¤¤â¤Î¤Ê¤Î¤Ç¤¢¤í¤¦¡£
¡¡»ä¤¬º£²ó¤Î¥¼¥ß¤òÄ̤·¡¢³Ø¤ó¤À¤³¤È¤Ï¤È¤Æ¤âÂ礤«¤Ã¤¿¡£¤¤Ã¤È¤³¤ì¤«¤é¼«¿È¤Î³Ø²Ê¤Ë¤ÆÆ±¤¸¤è¤¦¤Ê¡¢¤½¤ì¤è¤êÆñ¤·¤¤¥í¥Ü¥Ã¥È¤ò¸¦µæ¡¦³«È¯¤·¤Æ¤¤¤¯¤³¤È¤Ë¤Ê¤ë¤Î¤À¤È»×¤¦¡£¤·¤«¤·¡¢¤½¤³¤Ç¹Ô¤µÍ¤Þ¤Ã¤¿¤È¤»þ¡¢¤³¤Î¥¼¥ß¤ÇÃç´Ö¤È³Ø¤ó¤À¤³¤È¤ò»×¤¤½Ð¤·¤¿¤¤¤È»×¤¦¡£¤½¤·¤Æ¤¤¤Ä¤«¡¢Ã¯¤â¤¬»×¤¤ÉÁ¤¯¤è¤¦¤ÊÌ´¤Î¥í¥Ü¥Ã¥È¤òºî¤ê¾å¤²¤ë¤³¤È¤¬¤Ç¤¤ë¤è¤¦¤Ë¡¢¤³¤ì¤«¤é¤âÆü¡¹ÅØÎϤ·¤Æ¤¤¤¤¿¤¤¤È»×¤¦¡£
¡¡ºÇ¸å¤Ë¤³¤Î¡Ö¥í¥Ü¥Æ¥£¥¯¥¹ÆþÌ祼¥ß¡×¤Ç¡¢»ä¤ò½õ¤±¤Æ¤¯¤À¤µ¤Ã¤¿ÀèÀ¸¤Ø¡¢Ãç´Ö¤Ø¸þ¤±¤Æ´¶¼Õ¤ò½Ò¤Ù¤¿¤¤¤È»×¤¤¤Þ¤¹¡£
¡¡ËÜÅö¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£
½ªÎ»¹Ô:
[[2017b/Member]]
Ìܼ¡
#contents
*²ÝÂê¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤¯¤¿¤á¤Ë¡Ä [#k81a7a84]
º£²ó»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ï¤³¤Î²ÝÂê¤ò¥¯¥ê¥¢¤¹¤ë¤Ë¤¢¤¿¤Ã¤Æ½ÅÍפȤʤë¥Ý¥¤¥ó¥È¤Ë¤Ä¤¤¤Æ¼¡¤Î¤è¤¦¤Ë¹Í¤¨¤¿¡£
¡¡¡¥³¥Ã¥×¤ÎõººÊýË¡
¡¡¢¥³¥Ã¥×¤Î»ý¤Á±¿¤ÓÊýË¡
¡¡£°Üư¼êÃÊ
¡¡¤Æó¤Ä¤Î¥í¥Ü¥Ã¥È¤Î¶¨ÎÏÊýË¡
º£²ó¤Ï¡¢¾åµ¤Î4¤Ä¤Î¥Ý¥¤¥ó¥È¤ËÃíÌܤ·¤Æ¥í¥Ü¥Ã¥È¡¢¥×¥í¥°¥é¥à¤òºîÀ®¤·¤Æ¤¤¤¯¡£
*¥í¥Ü¥Ã¥È¤ÎÀâÌÀ [#y206a328]
**¥í¥Ü¥Ã¥È¤ÎÁªÂò¡Ê¥Ý¥¤¥ó¥È¤¤Î²ò·è¡Ë [#uda29c80]
¡ü2¤Ä¤Î¥í¥Ü¥Ã¥È¤«¤é¤ÎÁªÂò
¡¡º£²ó¤Î²ÝÂê¤ò¥¯¥ê¥¢¤¹¤ë¤Ë¤¢¤¿¤Ã¤ÆÆó¤Ä¤Î¥í¥Ü¥Ã¥È¤ò¤É¤Î¤è¤¦¤Ë»ÈÍѤ¹¤ë¤«¤¬¤È¤Æ¤âÂçÀڤˤʤäƤ¯¤ë¡£»ä¤¿¤Á¤Ï¡¢2¤Ä¤Î¥í¥Ü¥Ã¥È¤Î»ÈÍѤÏÊýË¡¤Ï¼¡¤Î2Ä̤ꤢ¤ë¤È¹Í¤¨¤¿¡£
¡¡1¡¥2¤Ä¤Î¥í¥Ü¥Ã¥È1¤Ä¤ËÁȤ߹ç¤ï¤»¤ë
¡¡¥á¥ê¥Ã¥È1¡¡¥×¥í¥°¥é¥ß¥ó¥°¤ò´Êñ¤Ê¤â¤Î¤È¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
¡¡¥á¥ê¥Ã¥È2¡¡¥¢¡¼¥à¤Î¹½Â¤¤Ë¥â¡¼¥¿¡¼¤ò2¤Ä»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
¡¡²ÝÂêÅÀ1¡¡ºî¶È¤Î®ÅÙ¤¬ÃÙ¤¯¤Ê¤ë¡Ê1Âæ¤Î¥í¥Ü¥Ã¥È¤È¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¡Ë¡£
¡¡²ÝÂêÅÀ2¡¡¥í¥Ü¥Ã¥È¤¬¤È¤Æ¤â½Å¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£
¡¡2¡¥2¤Ä¤Î¥í¥Ü¥Ã¥È¤òÊÌ¡¹¤Ëư¤«¤¹
¡¡¥á¥ê¥Ã¥È1¡¡ºî¶È¤Î®ÅÙ¤¬Á᤯¤Ê¤ë¡Ê2Âæ¤Î¥í¥Ü¥Ã¥È¤Ç¶¨ÎϤǤ¤ë¤¿¤á¡Ë¡£
¡¡¥á¥ê¥Ã¥È2¡¡2¤Ä¤Î¥í¥Ü¥Ã¥È¤ò»ÈÍѤ·¤¿¶¨ÎϺî¶È¤¬¤Ç¤¤ë¡£
¡¡²ÝÂêÅÀ1¡¡¥¢¡¼¥à¤Î¹½Â¤¤¬¥â¡¼¥¿¡¼¤ò1¤Ä¤·¤«»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¤¿¤áÊ£»¨¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£
¡¡²ÝÂêÅÀ2¡¡¥×¥í¥°¥é¥ß¥ó¥°¤¬Ê£»¨¤Ê¤â¤Î¤È¤Ê¤Ã¤Æ¤·¤Þ¤¦¡Ê¥³¡¼¥¹¾å¤Ç¾×ÆÍ¤·¤Ê¤¤¤è¤¦¤Ë¡ÄÅù¡Ë¡£
º£²ó¤Ï¡¢»þ´Ö¤Î´Ø·¸¤Ç¹½Â¤¤¬´Êñ¤Ç¡¢¤Ê¤ª¤«¤Ä¥×¥í¥°¥é¥ß¥ó¥°¤¬´Êñ¤Ê¤â¤Î¤È¤¹¤ë¤³¤È¤Î¤Ç¤¤ë
¡¡1¡¥2¤Ä¤Î¥í¥Ü¥Ã¥È1¤Ä¤ËÁȤ߹ç¤ï¤»¤ë
¤ÎÊýË¡¤Ç²ÝÂê¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤¤¿¤¤¡£
¡ü¥í¥Ü¥Ã¥È¤Î²ÝÂêÅÀ
¡¡2¤Ä¤Î¥í¥Ü¥Ã¥È1¤Ä¤ËÁȤ߹ç¤ï¤»¤ë¤¿¤á¤Ë¤Ï¡¢°Ê²¼¤Î²ÝÂêÅÀ¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤¯É¬Íפ¬¤¢¤ë¤È¹Í¤¨¤¿¡£
-²ÝÂêÅÀ1¡¡ºî¶È¤Î®ÅÙ¤¬ÃÙ¤¯¤Ê¤ë¡Ê1Âæ¤Î¥í¥Ü¥Ã¥È¤È¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¡Ë¡£
¢ª²ò·èºö¡¡¡Â®ÅÙ¤ÎÊѹ¹¡Ê¥×¥í¥°¥é¥ß¥ó¥°¡Ë
¡¡²ò·èºö¢¡¡¥³¡¼¥¹¤ÎÊѹ¹¡Ê¥×¥í¥°¥é¥ß¥ó¥°¡Ë
¡¡²ò·èºö£¡¡µ¡ÂΤηÚÎ̲½¡Ê¥í¥Ü¥Ã¥È¡Ë
-²ÝÂêÅÀ2¡¡¥í¥Ü¥Ã¥È¤¬¤È¤Æ¤â½Å¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£
¢ª²ò·èºö¡¡¡Â®ÅÙ¤ÎÊѹ¹¡Ê¥×¥í¥°¥é¥ß¥ó¥°¡Ë
¡¡²ò·èºö£¡¡µ¡ÂΤηÚÎ̲½¡Ê¥í¥Ü¥Ã¥È¡Ë
¡¡²ò·èºö¤¡¡¼ÖÎØ¤òÁý¤ä¤¹¡Ê¥í¥Ü¥Ã¥È¡Ë
°Ê¾å¤Î¥Ý¥¤¥ó¥È¤È²ÝÂêÅÀ¤ËÃíÌܤ·¤Æµ¡ÂΤòºîÀ®¤·¤Æ¤¤¤¯¡£
**¥í¥Ü¥Ã¥È¤ÎÁ´ÂÎÁü [#nb010d29]
&ref(2017b/Member/yuitom/Mission3/mission3_µ¡ÂÎ.jpg,50%,µ¡ÂΤÎÁ´ÂÎÁü);
¡¡º£²ó»ä¤¿¤Á¤¬ºîÀ®¤·¤¿¥í¥Ü¥Ã¥È¤Ï2¤Ä¤Î¥í¥Ü¥Ã¥È¤ò1¤Ä¤Ë¤Þ¤È¤á¤¿¤â¤Î¤Ç¡¢¤½¤ì¤¾¤ì²¼¤Î¥í¥Ü¥Ã¥È¤¬¥¢¡¼¥à´ØÏ¢¤òôÅö¤·¡¢¾å¤Î¥í¥Ü¥Ã¥È¤¬°Üư´ØÏ¢¤òôÅö¤·¤Æ¤¤¤ë¡£
¤½¤ì¤¾¤ì¤ÎÉô°Ì¤Ë¤Ä¤¤¤Æ¡¢¡Ö¥Ý¥¤¥ó¥È¡×¤È¡Ö²ÝÂêÅÀ¡×¤ËÃíÌܤ·¾Ü¤·¤¯¸«¤Æ¤¤¤³¤¦¤È»×¤¦¡£
**¥³¥Ã¥×¤ÎÆþ¼êÊýË¡¡Ê¥Ý¥¤¥ó¥È¡¡¢¢¤Î²ò·è¡Ë [#i8b0c8e4]
¡¡º£²ó¤Î²ÝÂê¤Ç¤Ï¥³¥Ã¥×¤ÎÆþ¼êÊýË¡¤È±¿ÈÂÊýË¡¤¬¤È¤Æ¤â½ÅÍפˤʤäƤ¯¤ë¡£
»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤Ï¤³¤ì¤ò²ò·è¤¹¤ë¤¿¤á¤Ë¡¢¥â¡¼¥¿¤ò2¤ÄÍøÍѤ·¤¿¥¢¡¼¥à¤òºîÀ®¤·¤¿¡£
¡ü¥³¥Ã¥×¤ò¤Ä¤«¤àµ¡¹½
-¥³¥Ã¥×¤ò°ú¤´ó¤»¤ë¥¢¡¼¥à
&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à1.jpg,50%,¥³¥Ã¥×¤ÎÆþ¼êÊýË¡¡);
¡¡¢ª¡¡&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à2.jpg,50%,¥³¥Ã¥×¤ÎÆþ¼êÊýË¡¢);
¡¡¾å¤Î¿Þ¤Î¤è¤¦¤Ë¼ÖÎØ¤ò¼è¤êÉÕ¤±¤ë¤³¤È¤Ç¡¢¥³¥Ã¥×¤È¥¢¡¼¥à¤Î°ÌÃÖ¤¬Â¿¾¯¤º¤ì¤Æ¤¤¤Æ¤â¡Ö¥³¥Ã¥×¤ò°ú¤´ó¤»¤Æ¤¬¤Ã¤Á¤ê¤Ä¤«¤à¡×¤³¤È¤ËÀ®¸ù¤·¤¿¡£¤³¤Î»þ¡¢¼ÖÎØ¤Ï¥³¥Ã¥×¤ò°ú¤´ó¤»¤ëƯ¤¤À¤±¤Ç¤Ê¤¯¡¢¥³¥Ã¥×¤¬¤º¤ìÍî¤Á¤ë¤³¤È¤òËɤ°³ê¤ê»ß¤á¤È¤·¤Æ¤âµ¡Ç½¤·¤Æ¤¤¤ë¡£
-ưÎÏ1¤Ä¤Ç¤Î¥¢¡¼¥à¤ÎÀ©¸æ¤ò¼Â¸½¤¹¤ë¤¿¤á¤Ë
&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à4.jpg,50%,¥¢¡¼¥à³«ÊĤλÅÁȤß);
¡¡¾å¤Î²èÁü¤Î¤è¤¦¤Ë»õ¼Ö¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç¡¢¥¢¡¼¥à¤ò³«¤¯ÊĤ¸¤ëưºî¤¬1¤Ä¤Î¥â¡¼¥¿¤Ç½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¤Þ¤¿¡¢¥×¥í¥°¥é¥ß¥ó¥°¤Ë¤Æ²óž³Ñ¤òÍѤ¤¤¿¥â¡¼¥¿¤ÎÀ©¸æ¤ò¹Ô¤Ã¤¿¤³¤È¤Ë¤è¤ê¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òÆþ¼ê¡¦±¿È¤¬¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
¡ü¥³¥Ã¥×¤ò¾å¤²¤ëµ¡¹½
&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à5.jpg,50%,¥¢¡¼¥à¾å²¼¤Î»ÅÁȤß);
»äã¤Î¥°¥ë¡¼¥×¤Ç¤Ï¡¢Á°¤Ç½Ò¤Ù¤¿¤è¤¦¤Ë¥³¥Ã¥×¤ò»ý¤Á¾å¤²¤ë¤¿¤á¤Ë2¤Ä¤Î¥â¡¼¥¿¤ò»ÈÍѤ·¤Æ¤¤¤ë¡£¤½¤Î¤¿¤á¡¢¥¢¡¼¥à¤¬¤È¤Æ¤â½Å¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¡£
¤½¤³¤Ç¡¢»äã¤Î¥°¥ë¡¼¥×¤Ï¾å¤Î²èÁü¤Î¤è¤¦¤Ë¡¢¥â¡¼¥¿¤È»õ¼Ö¤òÁȤ߹ç¤ï¤»¤ë¤³¤È¤Ç¥â¡¼¥¿¤ÎÎϤòºÇÂç¸Â¾å¤²¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤ò»ý¤Á¾å¤²¤ë¤³¤È¤¬¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
¡ü¥³¥Ã¥×¤òõ¤¹Ä¶²»ÇÈ¥»¥ó¥µ¤È°Üư¤Î¤¿¤á¤Î¸÷¥»¥ó¥µ
¡¡º£²ó¤Î²ÝÂê¤Ë¤Æ¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òõ¤¹¤¿¤á¤ËɬÍ×ÉԲķç¤Ê¤â¤Î¡¢¤½¤ì¤Ï¡ÖͲ»ÇÈ¥»¥ó¥µ¡×¤Ç¤¢¤ë¡£»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤ÏͲ»ÇÈ¥»¥ó¥µ¤È²óž³Ñ¤òÍøÍѤ¹¤ë¥â¡¼¥¿¤ÎÀ©¸æÊýË¡¤òÍѤ¤¤Æ¥³¥Ã¥×¤ÎÆþ¼ê¤ò¤è¤ê³Î¼Â¤Ê¤â¤Î¤È¤·¤¿¡£
&ref(2017b/Member/yuitom/Mission3/mission3_¥»¥ó¥µ.jpg,50%,¸÷¥»¥ó¥µ¤ÈͲ»ÇÈ¥»¥ó¥µ¤Î°ÌÃÖ´Ø·¸);
&ref(2017b/Member/yuitom/Mission3/mission3_¥»¥ó¥µ2.jpg,50%,¥¢¡¼¥à²¼¹ß»þ¤Î¸÷¥»¥ó¥µ¤Î°ÌÃÖ);
¡¡º£²ó¤Ï¡¢¾å¤Î¿Þ¤Î¤è¤¦¤ËͲ»ÇÈ¥»¥ó¥µ¤È¸÷¥»¥ó¥µ¤ò¼è¤êÉÕ¤±¤ë¤³¤È¤Ç¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òÆþ¼ê¡¢¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤è¤ê±¿È¤Ǥ¤ë¤È¹Í¤¨¤¿¡£
¼ÂºÝ¤Ë¥³¥Ã¥×¤Îõºº¥×¥í¥°¥é¥à¤ò»ÈÍѤ·»î¤·¤¿¤È¤³¤í¡¢¥¢¡¼¥à¤ÎÃæ¿´¤Ë²»ÇÈ¥»¥ó¥µ¡¼¤òÃÖ¤¯Á°¤ÈÈæ³Ó¤·¡¢¥³¥Ã¥×¤ÎÆþ¼ê¤ÎÀ®¸ùΨ¤ò³ÊÃʤ˾徺¤µ¤»¤ë¤³¤È¤ËÀ®¸ù¤·¤¿¡£
¡¡¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤Ä¤¤¤Æ¤Ï²¼¤Î¡Ö¡ü¥í¥Ü¥Ã¥È¤ò°Üư¤µ¤»¤ë¸÷¥»¥ó¥µ¡×¤Ë¤ÆÀâÌÀ¤¹¤ë¡£
**¥í¥Ü¥Ã¥È¤Î°Üư¼êÃʤηèÄê¡Ê¥Ý¥¤¥ó¥È£¡¢²ÝÂꤤβò·è¡Ë [#m42bda7b]
¡ü¥í¥Ü¥Ã¥È¤ò°Üư¤µ¤»¤ë¸÷¥»¥ó¥µ¡Ê¥Ý¥¤¥ó¥È£¡Ö°Üư¼êÃʡפβò·è¡Ë
¡¡º£²ó¡¢»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤Ï¥³¥Ã¥×¤òÆþ¼ê¡¦±¿È¤¹¤ë¤¿¤á¤Ë¡Ö²ÝÂê2¡×¤Ç»ÈÍѤ·¤¿¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î¥×¥í¥°¥é¥à¤ò´Êά²½¤·¤¿¥×¥í¥°¥é¥à¤òΩ¤Æ»ÈÍѤ·¤¿¡£¸÷¥»¥ó¥µ¤Î¼è¤êÉÕ¤±Êý¤Ë´Ø¤·¤Æ¤â¡¢Á°²ó¤Î¤â¤Î¤ò»²¹Í¤Ë¡ÖÃÏÌ̤ȿâľ¤Ë¡¢¤«¤ÄŬÀڤʵ÷Î¥¤À¤±ÃÏÌ̤ÈÏä·¤ÆÀßÃ֡פ¹¤ë¤³¤È¤Ç¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òÆþ¼ê¡¦±¿È¤¹¤ë¤³¤È¤ËÀ®¸ù¤·¤¿¡£
¡ü¥í¥Ü¥Ã¥È¤Î½ÅÎ̤ò»Ù¤¨¤ë4¤Ä¤Î¼ÖÎØ¡Ê²ÝÂꤡּÖÎØ¤òÁý¤ä¤¹¡×¤Î²ò·è¡Ë
&ref(2017b/Member/yuitom/Mission3/mission3_¼ÖÎØ.jpg,70%,4¤Ä¤Î¼ÖÎØ¤Î°ÌÃÖ);
¡¡¿Þ¤Î¤è¤¦¤Ëº£²ó¤Ï¶îÆ°ÎØ2ÎØ¡Ü¼«Í³¤Ë²óž¤¹¤ë¼ÖÎØ2ÎØ¤Ç½Å¤¤½ÅÎ̤ò»Ù¤¨¤Æ¤¤¤ë¡£¸åÎØ¤Î2¤Ä¤Î¼ÖÎØ¤¬¼«Í³¤Ë²óž¤¹¤ë¤¿¤á¡¢²óž»þ¤ËË໤¤Ë¤è¤êưºî¤¬¤ª¤«¤·¤¯¤Ê¤ë¤³¤È¤Ï̵¤«¤Ã¤¿¡£
¢¨¿Þ¤Ïµ¡ÂΤò΢¤«¤é¸«¤¿¤â¤Î¤Ç¤¢¤ë¡£
*Ãͤò´ÉÍý¤¹¤ë¤¿¤á¤ÎÄêµÁÉÕ¤± [#f3c69224]
**¥Þ¥¹¥¿¡¼¡Ê°Üư´ØÏ¢Ã´Åöµ¡ÂΡËÄêµÁÉÕ¤± [#ra4929f0]
¡ü¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î´ðËÜ¿ôÃÍ´ÉÍý
¡¡¥é¥¤¥ó¥È¥ì¡¼¥¹¤ò¹Ô¤¦¤Ë¤¢¤¿¤Ã¤ÆÉ¬ÍפȤʤäƤ¯¤ëÃͤò¤Þ¤È¤á¤Æ´ÉÍý¤·¡¢ÅÅÃÓ¾ÃÌפʤɤˤè¤Ã¤Æ¿ôÃͤËÊѹ¹¤¬À¸¤¸¤¿ºÝ¤ËÃͤòÊѤ¨¤ä¤¹¤¯¤·¤¿¡£
#define adjust Off(OUT_AB);Wait(50); // ÂÔµ¡»þ´Ö¡ÊÈùÄ´À°¡Ë
#define ultrasonic SensorUS(S1) //Ͳ»ÇÈ¥»¥ó¥µ¡¼
#define sensor_light SENSOR_2 // ¸÷¥»¥ó¥µ¡¼
#define black 30 // ¸÷¥»¥ó¥µ¡¼ºÇÄãÃÍ
#define white 60 // ¸÷¥»¥ó¥µ¡¼ºÇ¹âÃÏ
#define threshold (black+white)*1/2 // ´ð½àÀþ
#define deflection (sensor_light-threshold) // ¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î´ðËÜ·×»»¼°
¡¡¤³¤Î»þ¡¢adjust¤ÎÄêµÁÉÕ¤±¤Ë¤è¤ë0.05Éô֤ÎÂÔµ¡¤Ï¡¢¤½¤Î¸å¤Îưºî¤ò¤è¤êÀµ³Î¤Ë¹Ô¤¦¤¿¤á¤Ë¤Û¤Ü¤¹¤Ù¤Æ¤Î¥µ¥Ö¥ë¡¼¥Á¥ó¤ÎºÇ¸å¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¡£
¡ü¥³¥Ã¥×¤Îõº÷
¡¡¹ÖµÁÃæ¤ËÇÛÉÛ¤µ¤ì¤¿»ñÎÁ¤ò¸µ¤ËºîÀ®¤·¤¿¡£
¤³¤Î¥×¥í¥°¥é¥à¤Ï¡¢¥¿¥¤¥ä¤Î²óž³Ñ»ÈÍѤ·¤¿¥×¥í¥°¥é¥à¤Ë¤è¤êư¤¤¤Æ¤¤¤ë¤¿¤á¡¢¥¿¥¤¥ä¤Ë´Ø¤¹¤ë¾ðÊ󤬾ܤ·¤¯ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
const float diameter = 5.45; //¥¿¥¤¥ä¤Îľ·Â
const float track = 17.5; //¥¿¥¤¥ä¤Î¥È¥ì¥Ã¥ÉÉý
const float pi = 3.1415; //±ß¼þΨ
¡¡¤½¤ì¤¾¤ì¡¢¤³¤Î¿ôÃͤò¸µ¤ËÀµ³Î¤ÊÁ°¿Ê¸åÂब¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
**¥Þ¥¹¥¿¡¼¡Ê°Üư´ØÏ¢Ã´Åöµ¡ÂΡˤȥ¹¥ì¥¤¥Ö¡Ê¥¢¡¼¥à´ØÏ¢Ã´Åöµ¡ÂΡˤÎÄÌ¿® [#lb543d05]
¡¡º£²ó»äã¤Î¥°¥ë¡¼¥×¤Ç¤Ï2¤Ä¤Î¥í¥Ü¥Ã¥È¤ò1¤Ä¤Î¤â¤Î¤È¤·¤Æ»ÈÍѤ¹¤ë·Á¼°¤ò¤È¤Ã¤Æ¤¤¤ë¤¿¤á¡¢2¤Ä¤Îµ¡ÂΤÎÄÌ¿®¤¬É¬Í×ÉԲķç¤Ê¤â¤Î¤È¤Ê¤Ã¤Æ¤¯¤ë¡£¤½¤Î¤¿¤á¡¢¤½¤ì¤¾¤ì¤Î¾ðÊó¸ò´¹¤Î¤¿¤á¤Ë5¤Ä¤ÎÄêµÁÉÕ¤±¤ò¹Ô¤Ã¤¿¡£
#define cup_age_little 20 // »æ¥³¥Ã¥×¤ò¾¯¡¹¾å¤²¤ë
#define cup_age 30 // »æ¥³¥Ã¥×¾å¤²¤ë
#define cup_sage 40 // »æ¥³¥Ã¥×²¼¤²¤ë
#define cup_re 50 // »æ¥³¥Ã¥×»ý¤Áľ¤·ÈùÄ´À°
#define fin 9 // »Å»ö½ªÎ»Ï¢Íí
¥³¥Ã¥×¤Î»ý¤Áľ¤·¤Îưºî¤Ë´Ø¤·¤Æ¤Ï¡¢¥³¥Ã¥×¤¬µ¡ÂÎ¤Î°ÜÆ°»þ¤ËÀ¸¤¸¤ë¿¶Æ°¤Î¤¿¤á¤Ë¤º¤êÍî¤Á¤Æ¤¤Æ¤·¤Þ¤¦¤È¤¤¤¦ÌäÂê¤ò²ò·è¤¹¤ë¤¿¤á¤ËºîÀ®¤·¤¿¤â¤Î¤Ç¤¢¤ê¡¢¤³¤ì¤Ë¤è¤ê¥³¥Ã¥×¤¬¥º¥êÍî¤Á¤Æ¤·¤Þ¤¦¤³¤È¤òºÇÂç¸Â²ò¾Ã¤¹¤ë¤³¤È¤¬¤Ç¤¤¿¡£
¡¡¤Þ¤¿¡¢µ¡ÂΡʥޥ¹¥¿¡¼¤È¥¹¥ì¥¤¥Ö¡Ë¤È¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Î̾Á°¤Ë´Ø¤·¤Æ¤Ï¼¡¤Î¤è¤¦¤ËÄêµÁ¤·¤Æ¤¤¤ë¡£
#define master 0
#define slave 1
#define mail MAILBOX1
*¥µ¥Ö¥ë¡¼¥Á¥ó¤ÎÀâÌÀ [#r45912fd]
**¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ë¤è¤ë°Üư¡Ê¥Ý¥¤¥ó¥È£¡Ö°Üư¼êÃʡפβò·è¡Ë [#i1aa8e55]
¡¡»äã¤Î¥°¥ë¡¼¥×¤Ç¤Ï¡¢¥³¥Ã¥×¤Îõº÷¡¦±¿È¤˥饤¥ó¥È¥ì¡¼¥¹¥×¥í¥°¥é¥à¤ò»ÈÍѤ·¤Æ¤¤¤ë¡£º£²ó¤Î¥é¥¤¥ó¥È¥ì¡¼¥¹¥×¥í¥°¥é¥à¤ÏÁ°²ó¤Î²ÝÂê¤Î¤è¤¦¤Ê¹â¤¤ÀºÅÙ¤ÏɬÍפʤ¤¤¿¤á¡¢ÈæÎãÀ©¸æ¼°¤Î3Ãʳ¬¥×¥í¥°¥é¥à¤ò»ÈÍѤ·¤Æ¤¤¤ë¡£
¡ü¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î¸µ¤È¤Ê¤ë´ðËܼ°¡Ê²ò·èºö¡¡¡Â®ÅÙ¤ÎÊѹ¹¡Ë
¡¡º£²ó¡¢ºîÀ®¤·¤¿¥é¥¤¥ó¥È¥ì¡¼¥¹ÍѤÎÈæÎãÀ©¸æ¥×¥í¥°¥é¥à¤ÏÈó¾ï¤Ë´Êñ¤Ê¤â¤Î¤È¤Ê¤Ã¤Æ¤¤¤ë¡£
¤Þ¤¿¡¢º£²ó¤Î²ÝÂê¤ò¥¯¥ê¥¢¤¹¤ë¤Ë¤¢¤¿¤Ã¤Æ¿Ê¹ÔÊý¸þ±¦Â¦¤Î¥é¥¤¥ó¤Èº¸Â¦¥é¥¤¥ó¤ò¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ëɬÍפ¬¤¢¤Ã¤¿¤¿¤á¡¢2¤Ä¤ÎÈæÎãÀ©¸æ¤Î¥µ¥Ö¥ë¡¼¥Á¥ó¤òºîÀ®¤·¤¿¡£
¡¡¤Þ¤¿¡¢linetrase_¡(int ¢)¤È¤·¤¿»þ¡¢¡¤Ï¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ë¥é¥¤¥ó¤òɽ¤·¡Êright¢ª±¦¡¢left¢ªº¸¡Ë¡¢¢¤ÏÈæÎãÀ©¸æ¤ÎÃʳ¬¤òɽ¤·¡¢¢¤ÎÃͤòÂ礤¯¤¹¤ë¤³¤È¤Ç¤è¤êµÞ¤Ê¥«¡¼¥Ö¤Ç¤â¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ë¡£
¡¡Îã¡Ë´Ë¤ä¤«¤Ê¥«¡¼¥Ö¤Î±¦Â¦¤Î¥é¥¤¥ó¤ò¥é¥¤¥ó¥È¥ì¡¼¥¹¢ª¡¡linetrase_right(1.5);
sub linetrase_right(int x) //¥é¥¤¥ó¥È¥ì¡¼¥¹´ðËÜ(¿Ê¹ÔÊý¸þ±¦Â¦)
{
OnFwd(OUT_A,40+deflection*x);
OnFwd(OUT_B,40-deflection*x);
}
sub linetrase_left(int x) // ¥é¥¤¥ó¥È¥ì¡¼¥¹´ðËÜ(¿Ê¹ÔÊý¸þº¸Â¦)
{
OnFwd(OUT_A,40-deflection*x);
OnFwd(OUT_B,40+deflection*x);
}
¤Þ¤¿¡¢Â®Å٤δð½à¤¬40¤ÈÈó¾ï¤Ë®¤¯ÀßÄꤵ¤ì¤Æ¤¤¤ëÍýͳ¤Ï¡Ö²ò·èºö¡¡¡Â®ÅÙ¤ÎÊѹ¹¡×¤Ë¤è¤ë¤¿¤á¤Ç¤¢¤ê¡¢¤³¤ì¤è¤ê²¼¤ÎÃͤȤʤë¤Èµ¡ÂΤνÅÎ̤δط¸¤ÇÁ°¿Ê¤·¤Ê¤¤²ÄǽÀ¤¬¹â¤¯¤Ê¤ë¤¿¤á¤Ç¤¢¤ë¡£
¡ü´Êñ¤ÊÈæÎãÀ©¸æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î¥×¥í¥°¥é¥à
¡¡º£²ó¤Ï¡¢Á°²ó¤Î²ÝÂê¤Ç»ÈÍѤ·¤¿¡Ö¥é¥¤¥ó¥È¥ì¡¼¥¹¸òº¹ÅÀ¼±Ê̥⡼¥É¡×¤Î¥×¥í¥°¥é¥à¤ò¤½¤Î¤Þ¤Þ»ÈÍѤ·¤Æ¤¤¤ë¡£¤³¤Î¥×¥í¥°¥é¥à¤Ç¤Î¸òº¹ÅÀ¼±ÊÌÊýË¡¤Ï¡¢»ØÄê»þ´Ö¶Ê¤¬¤ê³¤±¤Æ¤â´ð½àÀþ¤è¤ê¹õ¤¤Éôʬ¤«¤éÈ´¤±½Ð¤»¤Ê¤¤¾ì¹ç¤Ë¸òº¹ÅÀ¤Èǧ¼±¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
¡¡¤½¤·¤Æº£²ó¡¢¸òº¹ÅÀ¼±ÊÌ»þ´Ö¤Ï100¤ÈÈó¾ï¤Ëû¤¯ÀßÄꤵ¤ì¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢Â®ÅÙ´ð½à¤ò40¤ÈÈó¾ï¤Ë®¤¯ÀßÄꤷ¤Æ¤¤¤ë¤¿¤á¡¢¸òº¹ÅÀ¼±ÊÌ»þ´Ö¤òû¤¯¤·¤Ê¤±¤ì¤Ð¸òº¹ÅÀ¼±Ê̤»¤º¤ËÄ̤ê²á¤®¤Æ¤·¤Þ¤¦¤«¤é¤Ç¤¢¤ë¡£
¡¡¤Þ¤¿¡¢intertify_¡()¤È¤·¤¿¾ì¹ç¡¢¡¤Ï¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ë¥é¥¤¥ó¤òɽ¤·¤Æ¤¤¤ë¡£¡Êright¢ª±¦¡¢left¢ªº¸¡Ë
¡¡Îã¡Ë±¦Â¦¤Î¥é¥¤¥ó¤ò¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¸òº¹ÅÀ¼±Ê̡ˢª¡¡intertify_right();
sub intertify_right() //¸òº¹ÅÀ¼±Ê̥饤¥ó¥È¥ì¡¼¥¹(±¦Â¦)
{
long t = CurrentTick();
while(CurrentTick()-t<100){ // ¸òº¹ÅÀ¼±ÊÌ»þ´Ö¤Ï100ÉÃ
if(sensor_light>white-5){ // 55¤è¤ê¾å¡ÊÇò¤¤¡Ë¤Î¾ì¹ç¢ª»þ´Ö¥ê¥»¥Ã¥È
linetrase_right(1.5);
t = CurrentTick();
}else if(sensor_light>black+5){ // 35¤è¤ê¾å¡Ê¤ª¤è¤½´ð½àÀþ¡Ë¤Î¾ì¹ç¢ª»þ´Ö¥ê¥»¥Ã¥È
linetrase_right(1.5);
t = CurrentTick();
}else{ // ¤½¤ì°Ê³°¤Î¾ì¹ç¡Ê¹õÀþ¡Ë¤Î¾ì¹ç
linetrase_right(1.5);
}
}
adjust;
}
sub intertify_left() //¸òº¹ÅÀ¼±Ê̥饤¥ó¥È¥ì¡¼¥¹(¿Ê¹ÔÊý¸þº¸Â¦)
{
long t = CurrentTick();
while(CurrentTick()-t<100){ // ¸òº¹ÅÀ¼±ÊÌ»þ´Ö¤Ï100ÉÃ
if(sensor_light>white-5){ // 55¤è¤ê¾å¡ÊÇò¤¤¡Ë¤Î¾ì¹ç¢ª»þ´Ö¥ê¥»¥Ã¥È
linetrase_left(1.5);
t = CurrentTick();
}else if(sensor_light>black+5){ // 35¤è¤ê¾å¡Ê¤ª¤è¤½´ð½àÀþ¡Ë¤Î¾ì¹ç¢ª»þ´Ö¥ê¥»¥Ã¥È
linetrase_left(1.5);
t = CurrentTick();
}else{ // ¤½¤ì°Ê³°¤Î¾ì¹ç¡Ê¹õÀþ¡Ë¤Î¾ì¹ç
linetrase_left(1.5);
}
}
adjust;
}
**Ͳ»ÇÈ¥»¥ó¥µ¡¼¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¤ÈÆþ¼ê [#f5507a3f]
¡¡º£²ó¡¢ÇÛÉÛ¤µ¤ì¤¿»²¹Í»ñÎÁ¤ò´ð¤ËͲ»ÇÈ¥»¥ó¥µ¡¼¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¤ÈÆþ¼ê¤Î¥×¥í¥°¥é¥à¤òºîÀ®¤·¤¿¡£
Ͳ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷
¡¡¥³¥Ã¥×¤Þ¤ÇÀ᤹ܶ¤ë¥×¥í¥°¥é¥à¤È¡¢¥³¥Ã¥×¤òõºº¤¹¤ë¤¿¤á¤Ëµ¡ÂΤòº¸±¦¤ËÍɤ餹¥×¥í¥°¥é¥à¤Ç¤¢¤ë¡£
º£²ó¡¢»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤ÏÇÛÉÛ¤µ¤ì¤¿¤â¤Î°Ê³°¤Ë¡¢¥³¥Ã¥×¤ËÀܶᤷ¤¿¸å¡¢¤â¤È¤Ë°ÌÃ֤ޤǸåÂह¤ë¤È¤¤¤¦¥×¥í¥°¥é¥à¤òÄɲä·¤¿¡£
¤³¤ì¤Ë¤è¤ê¡¢¥³¥Ã¥×Æþ¼ê¸å¤Î¥é¥¤¥ó¥È¥ì¡¼¥¹¤Ø¤ÎÉüµ¢¤¬³Î¼Â¤È¤Þ¤Ç¤Ï¤¤¤«¤Ê¤¯¤Æ¤â¡¢¤À¤¤¤¿¤¤¤Î³ÎΨ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¤ËÉüµ¢¤¹¤ë¤³¤È¤¬²Äǽ¤È¤Ê¤Ã¤¿¡£
void approach(float d) //µ÷Î¥dÁ°¿Ê
{
long angle = d/(diameter*pi)*360.0; //ɬÍפʎÀ޲ŽÔ¤Î²óž¿ô
RotateMotorEx(OUT_AB,50,angle,0,true,true);
adjust;
}
void back(float d) //µ÷Î¥d¸åÂà¡ÊÄÉ²Ã¥×¥í¥°¥é¥à¡Ë
{
long angle = d/(diameter*pi)*360.0; //ɬÍפʎÀ޲ŽÔ¤Î²óž¿ô
RotateMotorEx(OUT_AB,-50,angle,0,true,true);
adjust;
}
void spinAng(long ang) //³ÑÅÙangÅÙ¤ÎÀû²ó(»þ·×²ó¤ê)
{
long angle = track/diameter*ang; //ɬÍפʎÀ޲ŽÔ¤Î²óž¿ô
RotateMotorEx(OUT_AB,50,angle,100,true,true);
adjust;
}
void spinAng_opposite(long ang) //³ÑÅÙangÅÙ¤ÎÀû²ó(È¿»þ·×²ó¤ê)
{
long angle = track/diameter*ang; //ɬÍפʎÀ޲ŽÔ¤Î²óž¿ô
RotateMotorEx(OUT_AB,-50,angle,100,true,true);
adjust;
}
¡üͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷
¡¡¤³¤Î¥×¥í¥°¥é¥à¤ÏͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤Æ¡¢µ¡ÂΤòº¸±¦¤Ë¿¶¤ë¤³¤È¤Ç¾ã³²Êª¡Ê¥³¥Ã¥×¡Ë¤Þ¤Ç¤Îµ÷Î¥¤ò¬¤ê¡¢¾ã³²Êª¤Þ¤Ç¤Îµ÷Î¥¤¬ºÇ¤âû¤¤²óž³ÑÅÙ¤òµ²±¡¢¤½¤Î¸å¤½¤Î³ÑÅ٤˸þ¤¾ã³²Êª¤ËÀ᤹ܶ¤ë¤¿¤á¤ËɬÍפȤʤë¤â¤Î¤Ç¤¢¤ë¡£
¡¡¤Þ¤¿¡¢int search_distance(long ¡)¤È¤·¤¿¤È¤¡¢¡¤Ïõºº³ÑÅÙ¤òɽ¤¹¡£
¡¡Îã¡Ë120ÅÙ¤ÎÈϰϤǥ³¥Ã¥×¤òõ¤¹¡£¡Ê±¦¤Ë60ÅÙÀû²ó¡¢º¸¤Ë60ÅÙÀû²ó¡Ë¢ª¡¡search_distance(120);
int search_distance(long ang) // »æ¥³¥Ã¥×¤Îõº÷¡Êõºº³ÑÅÙ¡Ë
{
long tacho_min; //ºÇ¤â¶á¤¤µ÷Î¥¤ò¼Â¸½¤¹¤ëŽÀ޲ŽÔ¤Î²óž¿ô
int d_min = 300; //ºÇ¤â¶á¤¤µ÷Î¥¤Î²¾¤ÎºÇ¾®ÃÍ
long angle = (track/diameter)*ang; //Àû²ó³ÑÅÙ¤«¤éŽÀ޲ŽÔ¤Î²óž³Ñ¤ò·×»»
spinAng(ang/2); //»ØÄê³ÑÅÙ¤ÎȾʬÀû²ó(»þ·×²ó¤ê)
ResetTachoCount(OUT_AB); //³ÑÅÙ·×»»¤ò¥ê¥»¥Ã¥È
OnFwdSync(OUT_AB,50,-100);
while(MotorTachoCount(OUT_A)<=angle){
if(ultrasonic<d_min){
d_min = ultrasonic;
tacho_min = MotorTachoCount(OUT_A);
}
}
OnFwdSyncEx(OUT_AB,50,100,RESET_NONE); //»þ·×²ó¤ê¤ËÀû²ó
until(MotorTachoCount(OUT_A)<=tacho_min || ultrasonic<=d_min);
adjust;
Wait(500);
return d_min;
}
¡ý±þÍÑÊÔ¡Ö¸÷¥»¥ó¥µ¤òÍѤ¤¤¿¹õÀþõº÷¡×
¡¡¤³¤Î¥×¥í¥°¥é¥à¤Ï¡¢¼ÂºÝ¤Ë¤Ï»ÈÍѤµ¤ì¤ë¤³¤È¤¬¤Ê¤«¤Ã¤¿¤¬¡Ö¡üͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¡×¤ò±þÍѤ·¤ÆºîÀ®¤µ¤ì¤¿¤â¤Î¤Ç¤¢¤ë¡£ºîÀ®¤µ¤ì¤¿Íýͳ¤È¤·¤Æ¤Ï¡¢¥³¥Ã¥×Æþ¼ê¸å¤Ë¥é¥¤¥ó¥È¥ì¡¼¥¹¤ËÉüµ¢¤¹¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à¤Ç¤¢¤Ã¤¿¤¬¡¢¡ÖͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¡×¤Ë¤ÆÀâÌÀ¤·¤¿¸åÂह¤ë¥×¥í¥°¥é¥à¤¬´°À®¤·¤¿¤¿¤á¡¢É¬Íפ¬¤Ê¤¯¤Ê¤Ã¤¿¤«¤é¤Ç¤¢¤ë¡£
¡¡¤Þ¤¿¡¢ search_light_center(long ¡)¤È¤·¤¿¤È¤¡¢¡¤Ï¡Ö¡üͲ»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¡×¤ÈƱÍͤËõºº³ÑÅÙ¤òɽ¤·¤Æ¤¤¤ë¡£
sub search_light_center(long ang) //¡¡¸½ºß¤ÎÊý¸þ¤òÃæ¿´¤ËangÅÙ¤ÎÈϰϤǹõÀþ¤ÎÃæ¿´¤ò¸þ¤¯
{
long tacho_min; //ºÇ¤â¶á¤¤µ÷Î¥¤ò¼Â¸½¤¹¤ëŽÀ޲ŽÔ¤Î²óž¿ô
int light_min = 300; //ºÇ¤â°Å¤¤ÌÀ¤ë¤µ¤Î²¾¤ÎºÇ¾®ÃÍ
long angle = (track/diameter)*ang; //Àû²ó³ÑÅÙ¤«¤éŽÀ޲ŽÔ¤Î²óž³Ñ¤ò·×»»
spinAng(ang/2); //»ØÄê³ÑÅÙ¤ÎȾʬÀû²ó(»þ·×²ó¤ê)
ResetTachoCount(OUT_AB); //³ÑÅÙ·×»»¤ò¥ê¥»¥Ã¥È
OnFwdSync(OUT_AB,50,-100);
while(MotorTachoCount(OUT_A)<=angle){
if(sensor_light<light_min){
light_min = sensor_light;
tacho_min = MotorTachoCount(OUT_A);
}
}
OnFwdSyncEx(OUT_AB,50,100,RESET_NONE); //»þ·×²ó¤ê¤ËÀû²ó
until(MotorTachoCount(OUT_A)<=tacho_min || sensor_light<=light_min);
adjust;
Wait(500);
}
**¥¢¡¼¥à¤ÎÁàºî [#y9d1707d]
¡¡»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤Ï¡¢¥¢¡¼¥à¤Ë2¤Ä¤Î¥â¡¼¥¿¤ò»ÈÍѤ·¤Æ¤¤¤ë¤¿¤á¾¯¡¹Æ°¤¤¬Ê£»¨¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£¤½¤Î¤¿¤á¡¢¥¢¡¼¥à¤Îư¤¤òÁ´¤Æ¥µ¥Ö¥ë¡¼¥Á¥ó¤È¤·¤Æ¤Þ¤È¤á¤ë¤³¤È¤Ç¡¢¤è¤ê°·¤¤¤ä¤¹¤¯¤·¤¿¡£
¡¡¤Þ¤¿¤½¤ÎºÝ¤Ë¡¢²óž³Ñ¤ò»ÈÍѤ¹¤ë¥â¡¼¥¿¤ÎÀ©¸æË¡¤òÍѤ¤¤ë¤³¤È¤Ç¡¢¤è¤ê³Î¼Â¤Ë¥³¥Ã¥×¤òÆþ¼ê¡¦±¿È¡¦¥ê¥ê¡¼¥¹¤Ç¤¤ë¤è¤¦¤Ë¤·¤¿¡£
¡ü¥¢¡¼¥àÀ©¸æ¥×¥í¥°¥é¥à¤Î»ÈÍÑË¡¤Ë¤Ä¤¤¤Æ
¡¡¡Ötukamu()¡×¢ª¡¡¥³¥Ã¥×¤ò¤Ä¤«¤àºÝ¤Ë»ÈÍÑ
¡¡¡Öhanasu()¡×¢ª¡¡¥³¥Ã¥×¤òÎ¥¤¹ºÝ¤Ë»ÈÍÑ
¡¡¡Öup_little()¡×¢ª¡¡¥³¥Ã¥×¤ò±¿È¡ʥԥó¥Ý¥ó¶Ì½ê»ý»þ¡Ë¤¹¤ëºÝ¤Ë»ÈÍÑ
¡¡¡Öageru()¡×¢ª¡¡¡Ê¥³¥Ã¥×½ê»ý»þ¡Ë¥Ô¥ó¥Ý¥ó¶Ì¤òÏÈÆâ¤ËÆþ¤ì¤ëºÝ¤Ë»ÈÍÑ
¡¡¡¡¡¡¡¡¡¡¡¡ ¢ª¡¡¡Ê¥³¥Ã¥×̤½ê»ý»þ¡Ë¥³¥Ã¥×¤Îõºº»þ¤Ë»ÈÍÑ
¡¡¡Ödown_little()¡×¢ª¡Öup_little()¡×»þ¤Ë¤º¤ì¤¿Ê¬¤ÎÄ´À°
¡¡¡Ösageru()¡×¢ª¡¡¥³¥Ã¥×¤òÆþ¼ê¤¹¤ëºÝ¤Ë»ÈÍÑ
¥¢¡¼¥à´ØÏ¢¤Î¥×¥í¥°¥é¥à¤ÏÂçÂΤ³¤Î¤è¤¦¤Ë»ÈÍѤ·¤Æ¤¤¤ë¡£
¾°¡¢¤½¤ì¤¾¤ì¤Î¥×¥í¥°¥é¥à¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
sub tukamu() //ÄϤà
{
RotateMotor(OUT_A,50,440);
adjust; //¤â¤È¤ÏOff(OUT_A);Wait(300);
}
sub hanasu() //Î¥¤¹
{
RotateMotor(OUT_A,50,-440);
adjust;
}
sub up_little() //¾¯¤·¾å¤²¤ë
{
RotateMotor(OUT_B,60,-180);
adjust;
}
sub ageru() //¾å¤²¤ë
{
RotateMotor(OUT_B,60,-720);
adjust;
}
sub down_little() //¤¹¤³¤·²¼¤²¤ë
{
RotateMotor(OUT_B,60,180);
adjust;
}
sub sageru() //²¼¤²¤ë
{
RotateMotor(OUT_B,60,720);
adjust;
}
**¤½¤Î¾¤Î¥µ¥Ö¥ë¡¼¥Á¥ó [#yef1d92f]
¡¡²ÝÂê¤ò»Ï¤á¤ë¤Ë¤¢¤¿¤Ã¤Æ¡¢¤Þ¤ºA¤ÎÏÈÆâ¤«¤éÈ´¤±½Ð¤µ¤Ê¤¤¤È¹Ô¤«¤Ê¤¤¡£¤½¤Î¤¿¤á¡¢°Ê²¼¤Î¤è¤¦¤Ê´Êñ¤Ê¥µ¥Ö¥ë¡¼¥Á¥ó¤òºîÀ®¤·¤¿¡£
sub escape_A() // A¤«¤é¤Îæ½Ð
{
while(sensor_light<white-5){
OnFwd(OUT_B,50);
OnFwd(OUT_A,30);
}
adjust;
}
*²ÝÂê¤Î¹¶Î¬ [#eb2b3c16]
**QSºîÀï¡Ê²ò·èºö¢¡Ö¥³¡¼¥¹¤ÎÊѹ¹¡×¡Ë [#w04f4faf]
¡¡»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤¬²ÝÂê¤ò¹¶Î¬¤¹¤ë¤Ë¤¢¤¿¤Ã¤Æ¡¢½ÅÍפȤʤë¤Î¤Ç¤Ï¤Ê¤¤¤«¤ÈȽÃǤ·¤¿Éôʬ¡¢¤½¤ì¤Ï¡Ö¥³¡¼¥¹Ãæ¤ÎQ¡ÁS´Ö¡×¤Ç¤¢¤ë¡£
»ä¤¿¤Á¤¬¡¢¤Ê¤¼¤³¤³¤ËÃíÌܤ·¤¿¤Î¤«¤È¤¤¤¦¤È¡¢µ¡ÂΤò¤³¤³¤Ë°Üư¤µ¤»¤ë¤³¤È¤Ç¤Û¤Ü¡Ö²óž¡×¤È¡Ö¥³¥Ã¥×¤Îõºº¡×¤Î2¤Ä¤Î´Êñ¤Êưºî¤Î¤ß¤Ç¡¢²ÝÂê¤ò¥¯¥ê¥¢¤Ç¤¤ë¤Î¤Ç¤Ï¤Ê¤¤¤«¤È¹Í¤¨¤¿¤«¤é¤Ç¤¢¤ë¡£
¡üQS¶è´Ö¤Ë¤¿¤É¤êÃ夯¤¿¤á¤Ë¡Ä
¡¡QS¶è´Ö¤Ë¤¿¤É¤êÃ夯¤Þ¤Ç¤Î´Ö¤ËÌäÂê¤È¤Ê¤Ã¤Æ¤¯¤ë¾ì½ê¡¢¤½¤ì¤Ï¡ÖPQ¶è´Ö¡×¤ò¤É¤Î¤è¤¦¤ËÄ̲᤹¤ë¤Î¤«¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£±ß¤Î³°¼þ¤ò¥é¥¤¥ó¥È¥ì¡¼¥¹¤¹¤ë¤¿¤á¤Ë¤Ï±ï¤ÎÆâÉô¤Ë¤¢¤ëÏȤ¬¼ÙËâ¤Ë¤Ê¤Ã¤Æ¤¤Æ¤·¤Þ¤¦¤³¤È¤¬¸¶°ø¤Ç¤¢¤ë¡£
¡¡¤½¤Î¤¿¤á¤Ë»ä¤¿¤Á¤Ï¡¢¡ÖͲ»ÇÈ¥»¥ó¥µ¡¼¤òÍѤ¤¤¿¥³¥Ã¥×¤Îõº÷¤ÈÆþ¼ê¡×¤Ë¤Æ»ÈÍѤ·¤¿»ØÄê¤Îµ÷Î¥Á°¿Ê¤¹¤ë¤È¤¤¤¦¥×¥í¥°¥é¥à¤òÍѤ¤¤Æ¡¢¶¯°ú¤Ë±ß¤Î¿¿¤óÃæ¤òÆÍ¤ÃÀڤäƤ·¤Þ¤ª¤¦¤È¤¤¤¦ºîÀï¤ò¹Í¤¨¤¿¡£
intertify_right(); // B¢ªP¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹
spinAng(10); // P¤Ë¤Æ¿ÊϩĴÀ°
approach(30); // P¢ªQ
while(sensor_light>black+5){ // Q¡ÁS´Ö¤Ë¤Æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤ËÉüµ¢¡
OnFwd(OUT_A,50);
}
adjust;
while(sensor_light<white-5){ // Q¡ÁS´Ö¤Ë¤Æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤ËÉüµ¢¢
OnFwd(OUT_B,50);
}
adjust;
intertify_right(); // S¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¸òº¹ÅÀ¼±ÊÌ¡Ë
¡¡¤Þ¤¿¤³¤Î»þ¡¢ approach(30);¤È¤·¤Æ¤¤¤ë¤¬¤³¤ì¤Ï¿ô²ó»î¤·¤¿·ë²Ì¤³¤Î¿ôÃͤ¬ºÇ¤âŬ¤·¤Æ¤¤¤ë¤ÈȽÃǤ·¤¿¤¿¤á¤Ç¤¢¤ë¡£
**¥¹¥ì¥¤¥Ö¡Ê¥¢¡¼¥à´ØÏ¢Ã´Åöµ¡ÂÎ¡Ë¤Î¥×¥í¥°¥é¥à [#ufd00b3d]
¡¡º£²ó¡¢²ÝÂê¤ò¥¯¥ê¥¢¤¹¤ë¤Ë¤¢¤¿¤Ã¤ÆÉ¬ÍפȤʤäƤ¯¤ë¤â¤Î¤¬¡¢¥³¥Ã¥×¤ò¤É¤Î¤è¤¦¤Ë±¿È¤¹¤ë¤«¤Ç¤¢¤ë¡£ÆÃ¤Ë»ä¤¿¤Á¤Î¥°¥ë¡¼¥×¤Ç¤Ï¥³¥Ã¥×¤ò»ý¤Ã¤¿¤Þ¤ÞÏȤò¾è¤ê±Û¤¨¤ë¤È¤¤¤¦¥³¡¼¥¹¤òÄ̲᤹¤ë¡£¤½¤Î¤¿¤á¤Ë¤Ï¡¢»æ¥³¥Ã¥×¤¬ÏȤ˰ú¤Ã¤«¤«¤ë¤³¤È¤¬¤Ê¤¤¤è¤¦¤Ë»æ¥³¥Ã¥×¤ò¼ã´³É⤫¤»¤ëɬÍפ¬¤¢¤ë¡£
¡¡¤·¤«¤·¡¢¤³¤³¤Ç»æ¥³¥Ã¥×¤òÉ⤫¤Ð¤»¤¹¤®¤ë¤È¼¡¤ÏÃæ¤Ë¤¢¤ë¥Ô¥ó¥Ý¥ó¶Ì¤¬³°¤Ø½Ð¤Æ¤·¤Þ¤¦¡£¤½¤Î¤¿¤á¡¢»ä¤¿¤Á¤Ï¤Á¤ç¤¦¤É¥Ô¥ó¥Ý¥ó¶Ì¤¬³°¤Ø½Ð¤Ê¤¤¤è¤¦¤Ê¹â¤µ¤Îʬ¤À¤±¥³¥Ã¥×¤ò¾å¤Ë¤¢¤²¡¢¥³¥Ã¥×¤ò»ý¤Ã¤¿¤Þ¤ÞÏȤò¾è¤ê±Û¤¨¤ë¤È¤¤¤¦ÊýË¡¤ò¹Ô¤¦¤³¤È¤Ë¤·¤¿¡£
¡¡²¼¤Î¿Þ¤Ï¡Ö up_little() // ¥³¥Ã¥×¤ò¾¯¤·¾å¤²¤ë¡×¤ò¤·¤¿¸å¤Î¥³¥Ã¥×¡¢¥í¥Ü¥Ã¥È¤Î¾õÂ֤Ǥ¢¤ë¡£
&ref(2017b/Member/yuitom/Mission3/mission3_¥¢¡¼¥à3.jpg,50%,¥³¥Ã¥×±¿È»þ¤Î¥³¥Ã¥×¤Î¾õÂÖ);
task main()
{
int msg1; // »æ¥³¥Ã¥×¤ò¾¯¤·¾å¤²¤ë
until(msg1==cup_age_little)
ReceiveRemoteNumber(mail,true,msg1);
while(msg1==cup_age_little){
sageru();
tukamu();
up_little();
SendResponseNumber(mail,fin);
Wait(500);
msg1 = "";
}
int msg2; // »æ¥³¥Ã¥×¤ò»ý¤Áľ¤¹
until(msg2==cup_re)
ReceiveRemoteNumber(mail,true,msg2);
while(msg2==cup_re){
down_little();
hanasu();
tukamu();
up_little();
SendResponseNumber(mail,fin);
Wait(500);
msg2 = "";
}
¡¡
int msg3; // »æ¥³¥Ã¥×¤ò¾å¤²¤ë
until(msg3==cup_age)
ReceiveRemoteNumber(mail,true,msg3);
while(msg3==cup_age){
down_little();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg3 = "";
}
int msg4; // »æ¥³¥Ã¥×¤òÃÖ¤¯
until(msg4==cup_sage)
ReceiveRemoteNumber(mail,true,msg4);
while(msg4==cup_sage){
sageru();
hanasu();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg4 = "";
}
int msg5; // 2È֤λ楳¥Ã¥×¤ò¾¯¤·¾å¤²¤ë
until(msg5==cup_age_little)
ReceiveRemoteNumber(mail,true,msg1);
while(msg5==cup_age_little){
sageru();
tukamu();
up_little();
SendResponseNumber(mail,fin);
Wait(500);
msg5 = "";
}
int msg6; // »æ¥³¥Ã¥×¤ò¾å¤²¤ë
until(msg6==cup_age)
ReceiveRemoteNumber(mail,true,msg6);
while(msg6==cup_age){
down_little();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg6 = "";
}
int msg7; // »æ¥³¥Ã¥×¤òÃÖ¤¯
until(msg7==cup_sage)
ReceiveRemoteNumber(mail,true,msg7);
while(msg7==cup_sage){
sageru();
hanasu();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg7 = "";
}
int msg8; // 3È֤λ楳¥Ã¥×¾¯¤·¾å¤²¤ë
until(msg8==cup_age_little)
ReceiveRemoteNumber(mail,true,msg1);
while(msg8==cup_age_little){
sageru();
tukamu();
up_little();
SendResponseNumber(mail,fin);
Wait(500);
msg8 = "";
}
int msg9; // »æ¥³¥Ã¥×¤ò¾å¤²¤ë
until(msg9==cup_age)
ReceiveRemoteNumber(mail,true,msg9);
while(msg9==cup_age){
down_little();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg9 = "";
}
int msg10; // »æ¥³¥Ã¥×¤òÃÖ¤¯
until(msg10==cup_sage)
ReceiveRemoteNumber(mail,true,msg10);
while(msg10==cup_sage){
sageru();
hanasu();
ageru();
SendResponseNumber(mail,fin);
Wait(500);
msg10 = "";
}
}
¡¡¤Þ¤¿¡¢ÅÓÃæ¤Ë¤¢¤ë¥³¥Ã¥×¤Î»ý¤Áľ¤·¤Ë´Ø¤·¤Æ¤Ï¥³¥Ã¥×¤¬µ¡ÂÎ¤Î°ÜÆ°»þ¤ËÀ¸¤¸¤ë¿¶Æ°¤Î¤¿¤á¤Ë¤º¤êÍî¤Á¤Æ¤¤Æ¤·¤Þ¤¦¤È¤¤¤¦ÌäÂê¤ò²ò·è¤¹¤ë¤¿¤á¤ËºîÀ®¤·¤¿¤â¤Î¤Ç¤¢¤ê¡¢¤³¤ì¤Ë¤è¤ê¥³¥Ã¥×¤¬¥º¥êÍî¤Á¤Æ¤·¤Þ¤¦¤³¤È¤òºÇÂç¸Â²ò¾Ã¤¹¤ë¤³¤È¤¬¤Ç¤¤¿¡£
**¥Þ¥¹¥¿¡¼¡Ê°Üư´ØÏ¢Ã´Åöµ¡ÂÎ¡Ë¤Î¥×¥í¥°¥é¥à [#f3fd9950]
&ref(2017b/Member/yuitom/Mission3/mission3_map.jpg,50%,¥í¥Ü¥Ã¥È¤Îư¤Êý);
¡¡º£²ó¡¢¿Þ¤Î¤è¤¦¤Ê·Á¤Ç²ÝÂê¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤¤¿¤¤¤È¹Í¤¨¤Æ¤¤¤ë¡£
ÂçÂΤÎή¤ì¤È¤·¤Æ¤Ï
¡¡¡ÖA¤ò¥¹¥¿¡¼¥È¡×¢ª¡ÖB¤«¤é¥³¥Ã¥×¡¤Îõº÷¡¦Æþ¼ê¡×¢ª¡ÖB¤ËÌá¤ë¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×¢ª¡ÖB¢ªP¤Ø°Üư¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×
¡¡¢ª¡ÖP¢ªS¤Ø°Üư¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×¢ª¡ÖSQ´Ö¤Ë¤ÆU¥¿¡¼¥ó¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×¢ª¡ÖP¢ªS¤Ø°Üư¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×
¡¡¢ª¡ÖS¤Ë¤Æ¥Ô¥ó¥Ý¥ó¶Ì¥ê¥ê¡¼¥¹¡×¢ª¡ÖSQ´Ö¤Ë¤ÆU¥¿¡¼¥ó¡Ê»æ¥³¥Ã¥×½ê»ý¡Ë¡×¢ª¡ÖY¤Ë»æ¥³¥Ã¥×¤ò¥ê¥ê¡¼¥¹¡×
¡¡¢ª¡ÖS¤Ë¤Æ±¦²ó¤êÀû²ó¡×¢ª¡Ö¥³¥Ã¥×¢¤Îõº÷¡¦Æþ¼ê¡×¢ª¡Ö¸µ¤Î°ÌÃÖ¤ØÌá¤ë¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×¢ª¡ÖQS´Ö¤ËÉüµ¢¤¹¤ë¤Þ¤Ç¸«¤¤²ó¤êÀû²ó¡Ê¥Ô¥ó¥Ý¥ó¶Ì½ê»ý¡Ë¡×
¡¡¢ª¡ÖS¤Ë¤Æ¥Ô¥ó¥Ý¥ó¶Ì¥ê¥ê¡¼¥¹¡×¢ª¡ÖSQ´Ö¤Ë¤ÆU¥¿¡¼¥ó¡Ê»æ¥³¥Ã¥×½ê»ý¡Ë¡×¢ª¡ÖY¤Ë»æ¥³¥Ã¥×¤ò¥ê¥ê¡¼¥¹¡×
¡¡¢ªÆ±Íͤ˥³¥Ã¥×£¤âÆþ¼ê¡¦¥Ô¥ó¥Ý¥ó¶Ì¡¢»æ¥³¥Ã¥×¤ò¥ê¥ê¡¼¥¹¢ª¡¡½ªÎ»
¤È¤¤¤¦Î®¤ì¤Ç²ÝÂê¤ò¥¯¥ê¥¢¤·¤Æ¤¤¤³¤¦¤È»×¤¦¡£
¢¨¸å¤Î¡Öɾ²Á¡×¤Ç¤âµ½Ò¤·¤Æ¤¤¤ë¤¬¡¢º£²ó¤Ï¥³¥Ã¥×¤ò½Å¤Í¤ëưºî¤Ë¤Ä¤¤¤Æ¤Î¥×¥í¥°¥é¥à¤Ï¹Í¤¨¤Æ¤¤¤Ê¤¤¡£
¡¡º£²ó¡¢Ãí°Õ¤·¤¿¤³¤È¤È¤¹¤ë¤ÈÁ°²ó¤Î²ÝÂê¤ÈƱ¤¸¤è¤¦¤ËÅÅÃÓ¾ÃÌפˤè¤Ã¤Æ²ÝÂê¤ÎÀ®¸ùΨ¤¬º¸±¦¤µ¤ì¤Ê¤¤¥×¥í¥°¥é¥à¤ÎºîÀ®¤Ç¤¢¤ë¡£¤³¤ì¤Ë¤è¤ê¡¢²ÝÂê¤ÎÀ®¸ùΨ¤Ï¡ÊÅÓÃæ¤Þ¤Ç¤Ç¤Ï¤¢¤ë¤¬¡Ä¡Ë¾¯¤·¤Ï¾å¤¬¤Ã¤¿¤Î¤Ç¤Ï¤Ê¤¤¤«¤È»ä¤Ï¹Í¤¨¤Æ¤¤¤ë¡£
°Ê²¼¤¬¡¢º£²ó¤Îȯɽ²ñ¤Ë¤Æ»ÈÍѤ·¤¿¥×¥í¥°¥é¥à¤Ç¤¢¤ë¡£
task main()
{
SetSensorLowspeed(S1);
SetSensorLight(S2);
escape_A(); // A¤«¤éÈ´¤±½Ð¤¹
intertify_right(); // BÃÏÅÀ¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¸òº¹ÅÀ¼±Ê̥⡼¥É
int d1 = search_distance(90); // BÃÏÅÀ¤Ë¤Æ90ÅÙ¤ÎÈϰϤǥ³¥Ã¥×õº÷
if(d1>10){
approach(d1-5); // ¥³¥Ã¥×¤Î5cmÁ°¤Þ¤ÇÁ°¿Ê
}
int msg1; // ÄÌ¿®(£±È֤λ楳¥Ã¥×¤ò¾¯¤·¾å¤²¤ë)
while(msg1!=fin){
ReceiveRemoteNumber(mail,true,msg1);
SendRemoteNumber(slave,mail,cup_age_little);
}
back(d1-5); // Á°¿Êʬ¤À¤±¸åÂà¡ÊBÃÏÅÀ¤Þ¤ÇÌá¤ë¡Ë
spinAng(80); // B¤Ë¤ÆPÊýÌ̤ر¦Àû²ó
while(sensor_light>black+5){ // BP¶è´Ö¥é¥¤¥ó¥È¥ì¡¼¥¹Éüµ¢½àÈ÷¡
OnFwdSync(OUT_AB,50,0);
}
adjust;
while(sensor_light<white-5){ // BP¶è´Ö¥é¥¤¥ó¥È¥ì¡¼¥¹Éüµ¢½àÈ÷¢
OnFwd(OUT_B,50);
}
adjust;
intertify_right(); // B¢ªP¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¸òº¹ÅÀ¼±ÊÌ¡Ë
spinAng(10); // P¤Ë¤Æ¿ÊϩĴÀ°
approach(30); // P¢ªQ¤Þ¤ÇÁ°¿Ê¡ÊX¤ÎÏȤò¾è¤ê±Û¤¨¤ë¡Ë
while(sensor_light>black+5){ // QS¶è´Ö¥é¥¤¥ó¥È¥ì¡¼¥¹Éüµ¢½àÈ÷¡
OnFwd(OUT_A,50);
}
adjust;
while(sensor_light<white-5){ // QS¶è´Ö¥é¥¤¥ó¥È¥ì¡¼¥¹Éüµ¢½àÈ÷¢
OnFwd(OUT_B,50);
}
adjust;
intertify_right(); // Q¢ªS¤Þ¤Ç¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¸òº¹ÅÀ¼±ÊÌ¡Ë
spinAng(90); // S¤Ë¤Æ±¦Àû²ó¡ÊX¤Ø¸þ¤¯¡¡Ë
int msg2; // ÄÌ¿®(»æ¥³¥Ã¥×»ý¤Áľ¤¹)
while(msg2!=fin){
ReceiveRemoteNumber(mail,true,msg2);
SendRemoteNumber(slave,mail,cup_re);
}
while(sensor_light>black+5){ // S¤Ë¤Æ±¦Àû²ó¡ÊX¤Ø¸þ¤¯¢¡Ë
OnFwdSync(OUT_AB,50,100);
}
adjust;
while(sensor_light<white-5){
OnFwd(OUT_A,50);
}
adjust;
intertify_left(); // S¢ªQÊý¸þ¤Ø¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¥Ô¥ó¥Ý¥ó¶Ì¤òXÏÈÆâ¤Ø¡Ë
int msg3; // ÄÌ¿®(»æ¥³¥Ã¥×¤ò¾å¤²¤ë)
while(msg3!=fin){
ReceiveRemoteNumber(mail,true,msg3);
SendRemoteNumber(slave,mail,cup_age);
}
adjust;
spinAng(320); // Y¤ÎÊý¸þ¤Ë¸þ¤¯
¡¡// ËÜÈ֤Ϥ³¤³¤Ç½ªÎ» //
while(sensor_light>black+5){
OnFwdSync(OUT_AB,50,0);
}
adjust;
int msg4; // ÄÌ¿®(»æ¥³¥Ã¥×¤òÃÖ¤¯)
while(msg4!=fin){
ReceiveRemoteNumber(mail,true,msg4);
SendRemoteNumber(slave,mail,cup_sage);
}
adjust;
¡¡// Îý½¬¤Ç¤Ï¤³¤³¤Ç½ªÎ» //
spinAng(90); // 2È֤λ楳¥Ã¥×¤ÎÊý¸þ¤Ë¸þ¤¯
int d2 = search_distance(90); // 90ÅÙ¤ÎÈϰϤǥ³¥Ã¥×õº÷
if(d2>10){
approach(d2-5); // ¥³¥Ã¥×¤Î5cmÁ°¤Þ¤ÇÁ°¿Ê
}
int msg5; // ÄÌ¿®(2È֤λ楳¥Ã¥×¤ò¾¯¤·¾å¤²¤ë)
while(msg5!=fin){
ReceiveRemoteNumber(mail,true,msg5);
SendRemoteNumber(slave,mail,cup_age_little);
back(d2-5); // Á°¿Êʬ¤À¤±¸åÂà¡Ê¸µ¤Î°ÌÃÖ¤ØÌá¤ë¡Ë
while(sensor_light>black+5){ // X¤ÎÊý¸þ¤Ø¸þ¤¯
OnFwdSync(OUT_AB,50,100);
}
adjust;
while(sensor_light<white-5){
OnFwd(OUT_A,50);
}
adjust;
intertify_left(); // S¢ªQÊý¸þ¤Ø¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¥Ô¥ó¥Ý¥ó¶Ì¤òXÏÈÆâ¤Ø¡Ë
int msg6; // ÄÌ¿®(»æ¥³¥Ã¥×¤ò¾å¤²¤ë)
while(msg6!=fin){
ReceiveRemoteNumber(mail,true,msg6);
SendRemoteNumber(slave,mail,cup_age);
}
adjust;
spinAng(320); // Y¤ÎÊý¤Ë¸þ¤¯
while(sensor_light>black+5){
OnFwdSync(OUT_AB,50,0);
}
adjust;
int msg7; // ÄÌ¿®(»æ¥³¥Ã¥×¤òÃÖ¤¯)
while(msg7!=fin){
ReceiveRemoteNumber(mail,true,msg7);
SendRemoteNumber(slave,mail,cup_sage);
}
spinAng_opposite(90); // 3È֤λ楳¥Ã¥×¤ÎÊý¤Ë¸þ¤¯
int d3 = search_distance(90); // 90ÅÙ¤ÎÈϰϤǥ³¥Ã¥×õº÷
if(d3>10){
approach(d3-5); // ¥³¥Ã¥×¤Î5cmÁ°¤Þ¤ÇÁ°¿Ê
}
int msg8; // ÄÌ¿®(3È֤λ楳¥Ã¥×¤ò¾¯¤·¾å¤²¤ë)
while(msg8!=fin){
ReceiveRemoteNumber(mail,true,msg8);
SendRemoteNumber(slave,mail,cup_age_little);
}
back(d3-5); // Á°¿Êʬ¤À¤±¸åÂà¡Ê¸µ¤Î°ÌÃÖ¤ØÌá¤ë¡Ë
while(sensor_light>black+5){ // X¤ÎÊý¤Ë¸þ¤¯
OnFwdSync(OUT_AB,-50,100);
}
adjust;
intertify_right(); // S¢ªQÊý¸þ¤Ø¥é¥¤¥ó¥È¥ì¡¼¥¹¡Ê¥Ô¥ó¥Ý¥ó¶Ì¤òXÏÈÆâ¤Ø¡Ë
int msg9; // ÄÌ¿®(»æ¥³¥Ã¥×¤ò¾å¤²¤ë)
while(msg9!=fin){
ReceiveRemoteNumber(mail,true,msg9);
SendRemoteNumber(slave,mail,cup_age);
}
adjust;
spinAng(320); // Y¤ÎÊý¸þ¤Ë¸þ¤¯
while(sensor_light>black+5){
OnFwdSync(OUT_AB,50,0);
}
adjust;
int msg10; // ÄÌ¿®(»æ¥³¥Ã¥×¤òÃÖ¤¯)
while(msg10!=fin){
ReceiveRemoteNumber(mail,true,msg10);
SendRemoteNumber(slave,mail,cup_sage);
}
}
¡üɾ²Á
¡¡¡Ö¥Ô¥ó¥Ý¥ó¶Ì¢ª¡¡2¤Ä¡¢¥³¥Ã¥×¢ª¡¡0¡¡ÆÀÅÀ¡Ä4ÅÀ¡×
¡¡º£²ó¤Ï»þ´Ö¤¬Â¤ê¤º¡¢Èó¾ï¤Ë²ù¤·¤¤·ë²Ì¤È¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£
-¸¶°ø¤È»×¤ï¤ì¤ëÌäÂêÅÀ
¡¡ÌäÂêÅÀ¡¡¡¡Ö²ò·èºö¢¡¡¥³¡¼¥¹¤ÎÊѹ¹¡×¤ÎµÍ¤á¤Î´Å¤µ
¢ª¡¡X¤ÎÏȤò¶¯°ú¤ËÄ̲᤹¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢Ä¶²»ÇÈ¥»¥ó¥µ¤òÍøÍѤ·Â¾¤Î¥³¥Ã¥×¤ò¤¦¤Þ¤¯»ÈÍѤ¹¤ë¤³¤È¤Ç¤â¤Ã¤È³Î¼Â¤Ê¥³¥Ã¥×¤ÎÍ¢Á÷¤¬¤Ç¤¤¿¤Î¤Ç¤Ï¤Ê¤¤¤«¤È¹Í¤¨¤ë¡£
¡¡ÌäÂêÅÀ¢¡¡¥×¥í¥°¥é¥ß¥ó¥°¤ÎĹʸ²½
¢ª¡¡º£²ó¤Ï¤Û¤È¤ó¤É¥°¥ë¡¼¥×¤Î°ì¿Í¤ËǤ¤»¤ë·Á¤È¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¤Î¤À¤¬¡¢¤½¤Î¥×¥í¥°¥é¥à¤ò¥°¥ë¡¼¥×Æâ¤Ç¤µ¤é¤Ë¶¦Í¡¦²þÁ±¤¹¤ë¤³¤È¤Ë¤è¤ê¹¹¤Ë¡¢¥×¥í¥°¥é¥ß¥ó¥°¤òû¤¯¡¦²þÁ±¤·¤ä¤¹¤¯¤Ç¤¤¿¤È¹Í¤¨¤é¤ì¤ë¡£
¡¡ÌäÂêÅÀ£¡¡¡Ö²ò·èºö£¡¡µ¡ÂΤηÚÎ̲½¡×¤Î̤²ò·è
¢ª¡¡º£²ó»þ´Ö¤Î´Ø·¸¤Ç¡¢µ¡ÂΤβþÎɤ˻þ´Ö¤ò³ä¤¯¤³¤È¤¬¤Ç¤¤Ê¤«¤Ã¤¿¡£¤½¤Î¤¿¤á¤ËÌÀ¤é¤«¤Ë½ÅÎÌ¥ª¡¼¥Ð¡¼¤Êµ¡ÂΤÇËÜÈÖ¤ò·Þ¤¨¤Æ¤·¤Þ¤Ã¤¿¤Î¤À¤¬¡¢¤â¤Ã¤È²þÎɤ·¡¢·ÚÎ̲½¡¦µ¡¹½¤Î´Êά²½¤¬¤Ç¤¤¿¤Î¤Ç¤Ï¤Ê¤¤¤«¤È¹Í¤¨¤Æ¤¤¤ë¡£
¡¡ÌäÂêÅÀ¤¡¡¥³¥Ã¥×¤ò½Å¤Í¤ë¤³¤È¤ÎÃÇǰ
¢ª¡¡º£²ó»þ´Ö¤Î´Ø·¸¤Ç¡¢¥³¥Ã¥×¤ò½Å¤Í¤ë¤È¤¤¤¦Æ°ºî¤Þ¤Ç¤ËÃå¼ê¤Ç¤¤Ê¤«¤Ã¤¿¡£¤½¤â¤½¤â¤½¤³¤Þ¤Çưºî¤¬À®¸ù¤·¤Ê¤«¤Ã¤¿¤Î¤Ç¤¢¤ë¤¬¡¢¤ä¤Ï¤ê¥×¥í¥°¥é¥à¤¬Ì¤´°¤Î¤Þ¤ÞËÜÈÖ¤ËÄ©¤à¤³¤È¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¤Î¤Ï¤È¤Æ¤â²ù¤·¤«¤Ã¤¿¡£¤ª¤½¤é¤¯¡¢Ä¶²»ÇÈ¥»¥ó¥µ¤òÍѤ¤¤ë¤³¤È¤Ç¥³¥Ã¥×¤ò½Å¤Í¤ëưºî¤òÀ®¸ù¤µ¤»¤ë¤³¤È¤¬²Äǽ¤Ç¤¢¤Ã¤¿¤È¹Í¤¨¤Æ¤¤¤ë¡£
*¤Þ¤È¤á [#y672585d]
**²ÝÂê3¤Ë´Ø¤·¤Æ [#v0ace856]
¡¡º£²ó¤Ï¡¢»þ´Ö¤Î´Ø·¸¤Ç´°À®Å٤ι⤤¥í¥Ü¥Ã¥È¡¢¥×¥í¥°¥é¥à¤òºîÀ®¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤«¤Ã¤¿¡£¤Þ¤¿¡¢²ÝÂê¤ÎÀ®¸ùΨ¤Ë´Ø¤·¤Æ¤â¤¢¤Þ¤ê¹â¤¤¤â¤Î¤È¤¤¤¨¤ë¤â¤Î¤òºîÀ®¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤«¤Ã¤¿¡£
¡¡¤·¤«¤·¡¢¥í¥Ü¥Ã¥È¤Ï¤¢¤¯¤Þ¤Ç¤â¥×¥í¥°¥é¥à¤Ë½¾¤Ã¤ÆÆ°¤¤¤Æ¤¯¤ì¤¿¤Þ¤Ç¤Ç¤¢¤ê¡¢´°À®ÅÙ¤¬¹â¤¯¤Ê¤¤¤È¤¤¤Ã¤Æ¤â¡¢º£²ó¤Î²ÝÂê¤ò´°Á´¤Ë¤³¤Ê¤»¤ë¥ì¥Ù¥ë¤Î¥í¥Ü¥Ã¥È¤Ë¤Ï¤Ê¤Ã¤Æ¤¤¤¿¤Ï¤º¤Ê¤Î¤Ç¡¢¤¢¤È¤Ï»ä¤¿¤Á¤¬¤É¤ì¤Û¤É¡¢¥×¥í¥°¥é¥ß¥ó¥°¤ò¹©ÉפǤ¤ë¤«¡¢²þÎɤǤ¤ë¤«¤Ë²ÝÂê¤ÎÀ®¸ù¤¬Ä¾ÀÜ´Ø·¸¤·¤Æ¤¤¤¿¤È¹Í¤¨¤ë¡£¤ª¤½¤é¤¯¡¢Á´¥°¥ë¡¼¥×¤¬¹Í¤¨¤Æ¤¤¤ë¤³¤È¤Ç¤¢¤ë¤È»×¤¦¤¬¡¢¤â¤¦¾¯¤·¤Î»þ´Ö¤¬¤¢¤ì¤Ð²ÝÂê¤ò¥¯¥ê¥¢¤Ç¤¤ë¤È¹Í¤¨¤Æ¤¤¤ë¡£¤½¤Î¤¿¤á¡¢º£²ó¤Î²ÝÂê¤Ï;·×¤Ë²ù¤·¤¤·ë²Ì¤È¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£¡¡
**Á´ÂΤòÄ̤·¤Æ [#d2956049]
¡¡¤³¤Î¥¼¥ß¤òÄ̤·¤Æ»ä¤Ï¡¢¼«Ê¬¤¬º£¤Þ¤Ç´°àú¤Ê¸ºß¤À¤È¹Í¤¨¤Æ¤¤¤¿¥í¥Ü¥Ã¥È¤¬¤¤¤«¤ËÊ£»¨¤Ê¥×¥í¥°¥é¥àư¤¤¤Æ¤¤¤ë¤«¡¢¾°³î¤Ä»ÔÈΤΥí¥Ü¥Ã¥È¤¬¤¤¤«¤ËÀöÎý¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤Ê¤Î¤«¡¢¤È¤¤¤¦¤³¤È¤ò¿È¤ËÝî¤ß¤ÆÂà´±¤¹¤ë¤³¤È¤¬¤Ç¤¤¿¡£
¡¡»ä¤¿¤Á¤¬º£²ó°·¤Ã¤Æ¤¤¿¥í¥Ü¥Ã¥È¤Ï¡¢¤È¤Æ¤â´Êñ¤Ê¤Ä¤¯¤ê¤Ç¤¢¤ë¡£¤·¤«¤·¡¢¤½¤Î´Êñ¤Ê¥í¥Ü¥Ã¥È¤òư¤«¤¹¤¿¤á¤ËŤ¤»þ´Ö¤ÈÄ´Àá¤È²þÎɤò¹Ô¤¤¡¢¤è¤¦¤ä¤¯¾¯¤·¤Ï¤Þ¤È¤â¤Êư¤¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£´Êñ¤Ê¥â¡¼¥¿¤È¥»¥ó¥µ¤òÍѤ¤¤Æ¤â¤³¤ì¤À¤±¤ÎÆñ°×Å٤Ǥ¢¤ë¤«¤é¡¢¤ª¤½¤é¤¯»ÔÈΤÎÊ£»¨¤Ê¥í¥Ü¥Ã¥È¤Ï¤µ¤é¤Ë¤½¤Î²¿½½ÇܤâÆñ¤·¤¤¤â¤Î¤Ê¤Î¤Ç¤¢¤í¤¦¡£
¡¡»ä¤¬º£²ó¤Î¥¼¥ß¤òÄ̤·¡¢³Ø¤ó¤À¤³¤È¤Ï¤È¤Æ¤âÂ礤«¤Ã¤¿¡£¤¤Ã¤È¤³¤ì¤«¤é¼«¿È¤Î³Ø²Ê¤Ë¤ÆÆ±¤¸¤è¤¦¤Ê¡¢¤½¤ì¤è¤êÆñ¤·¤¤¥í¥Ü¥Ã¥È¤ò¸¦µæ¡¦³«È¯¤·¤Æ¤¤¤¯¤³¤È¤Ë¤Ê¤ë¤Î¤À¤È»×¤¦¡£¤·¤«¤·¡¢¤½¤³¤Ç¹Ô¤µÍ¤Þ¤Ã¤¿¤È¤»þ¡¢¤³¤Î¥¼¥ß¤ÇÃç´Ö¤È³Ø¤ó¤À¤³¤È¤ò»×¤¤½Ð¤·¤¿¤¤¤È»×¤¦¡£¤½¤·¤Æ¤¤¤Ä¤«¡¢Ã¯¤â¤¬»×¤¤ÉÁ¤¯¤è¤¦¤ÊÌ´¤Î¥í¥Ü¥Ã¥È¤òºî¤ê¾å¤²¤ë¤³¤È¤¬¤Ç¤¤ë¤è¤¦¤Ë¡¢¤³¤ì¤«¤é¤âÆü¡¹ÅØÎϤ·¤Æ¤¤¤¤¿¤¤¤È»×¤¦¡£
¡¡ºÇ¸å¤Ë¤³¤Î¡Ö¥í¥Ü¥Æ¥£¥¯¥¹ÆþÌ祼¥ß¡×¤Ç¡¢»ä¤ò½õ¤±¤Æ¤¯¤À¤µ¤Ã¤¿ÀèÀ¸¤Ø¡¢Ãç´Ö¤Ø¸þ¤±¤Æ´¶¼Õ¤ò½Ò¤Ù¤¿¤¤¤È»×¤¤¤Þ¤¹¡£
¡¡ËÜÅö¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£
¥Ú¡¼¥¸Ì¾: