2018a/Member/ryota/Mission3
¤ò¥Æ¥ó¥×¥ì¡¼¥È¤Ë¤·¤ÆºîÀ®
[
¥È¥Ã¥×
] [
¿·µ¬
|
°ìÍ÷
|
¸¡º÷
|
ºÇ½ª¹¹¿·
|
¥Ø¥ë¥×
|
¥í¥°¥¤¥ó
]
³«»Ï¹Ô:
[[2018a/MemberOnly]]
²ÝÂꣳ
*¥³¡¼¥¹¡¦¥ë¡¼¥ë [#gaf3043d]
#ref(2018a-mission3.png)
¡¦¶¥µ»»þ´Ö¤Ï¿³È½¤¬Â³¹ÔÉÔǽ¤ÈȽÃǤ¹¤ë¤Þ¤Ç¡¢¤¢¤ë¤¤¤Ï¥ê¥¿¥¤¥¢¤¹¤ë¤Þ¤Ç¡£
¡¦¿Þ¤ÎAÃÏÅÀ¤Þ¤¿¤Ï¡Ê¤ª¤è¤Ó¡ËA'ÃÏÅÀ¤«¤é¥¹¥¿¡¼¥È¤¹¤ë¡£¤¿¤À¤·ÀÜÃϤ·¤Æ¤¤¤ëÉôʬ¤Ï¤½¤ì¤¾¤ì¤ÎÎΰèÆâ¤Ë¼ý¤Þ¤ë¤â¤Î¤È¤¹¤ë¡ÊÀþ¾å¤ÏOK¡Ë¡£~
¡¦¾å¶õÉôʬ¤ÏÎΰ褫¤é¤Ï¤ß½Ð¤·¤Æ¤¤¤Æ¤â¤è¤¤¡£~
¡¦A¥¿¥¤¥×¤Î¶õ¤´Ì¤ò±ßYÆâ¤Ë¡¢B¥¿¥¤¥×¤Î¶õ¤´Ì¤ò±ßXÆâ¤Ë±¿¤Ö¡£~
¡¦³«»Ï¤Î¹ç¿Þ¤«¤é£µÉÃ°ÊÆâ¤Ë¥¹¥¿¡¼¥È¥Ü¥¿¥ó¤ò²¡¤¹ºî¶È¤ò´°Î»¤¹¤ë¤³¤È¡£~
¡¦¶¥µ»¤¬½ªÎ»¤¹¤ë¤Þ¤Ç¡¢¥í¥Ü¥Ã¥È¤Ë¿¨¤Ã¤¿¤ê¿Í´Ö¤¬±ó³Ö¤ÇÁàºî¤·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£~
¡¦ÅÓÃæ¤Ç¤¦¤Þ¤¯Æ°¤«¤Ê¤¯¤Ê¤Ã¤¿¾ì¹ç¡¢£±²ó¸Â¤êºÆ¥¹¥¿¡¼¥È¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡ÊºÆ¥¹¥¿¡¼¥È¤ÎºÝ¤ËÊÌ¥×¥í¥°¥é¥à¤Çµ¯Æ°¤·¤Æ¤è¤¤¡Ë¡£~
´ðËÜÆÀÅÀ¤Î·×»»ÊýË¡~
¡¦±¿¤ó¤À¶õ¤´Ì¤Î¿ô¡ß3ÅÀ~
¡¦¶õ¤´Ì¤òÀѤ߽ŤͤÆÃÖ¤¯¤³¤È¤¬¤Ç¤¤Ð¾ì¹ç¡¢2ÃÊÌܤζõ¤´Ì°ì¤Ä¤Ë¤Ä¤2ÅÀ²Ã»»¡¢3ÃÊÌܤζõ¤´Ì°ì¤Ä¤Ë¤Ä¤3ÅÀ²Ã»»¤¹¤ë¡£~
¡¦±ßÆâ¤«¤é¤Ï¤ß½Ð¤·¤Æ¤¤¤ë¾ì¹ç¡¢È¾Ê¬°Ê²¼¤Ê¤é1ÅÀ¸ºÅÀ¡¢È¾Ê¬°Ê¾å¤Ê¤é2ÅÀ¸ºÅÀ¡£~
¡¦´Ö°ã¤Ã¤¿±ßÆâ¤Ë¶õ¤´Ì¤òÃÖ¤¤¤¿¾ì¹ç¤Ï¡¢1¸Ä¤Ë¤Ä¤1ÅÀ¸ºÅÀ¡£~
¡¦´Ö°ã¤Ã¤¿±ßÆâ¤Î2ÃÊÌܤ˶õ¤´Ì¤òÃÖ¤¤¤¿¾ì¹ç¤Ï1¸Ä¤Ë¤Ä¤3ÅÀ¸ºÅÀ¡¢¤½¤Î¾å¤Ë¤¢¤ë¶õ¤´Ì¤Ï0ÅÀ~
µ»½ÑÅÀ¤Î·×»»ÊýË¡~
°Ê²¼¤Îưºî¤ÎÀºÅÙ¡¦¥¹¥Ô¡¼¥É¡¦³Î¼ÂÀ¤Ê¤É¤ò´Þ¤á¤¿µ»½ÑŪ¤Ê¹©Éפä·Ý½ÑÀ¤Ë¤Ä¤¤¤ÆÂ¾¤ÎÁ´¤Æ¤Î¥Á¡¼¥à(5¥Á¡¼¥à)¤¬20ÅÀËþÅÀ¤ÇºÎÅÀ¤·¡¢¤½¤ÎÊ¿¶ÑÅÀ¤òµá¤á¤ë¡£~
¡¦¶õ¤´Ì¤òõ¤·¼è¤ê¤Ë¤¤¤¯¤Þ¤Ç¤Îưºî (3ÅÀ)~
¡¦¶õ¤´Ì¤òÄÏ¤àÆ°ºî (3ÅÀ)~
¡¦¶õ¤´Ì¤ò±¿¤Öưºî (2ÅÀ)~
¡¦¶õ¤´Ì¤òÃÖ¤¯Æ°ºî (2ÅÀ)~
¡¦¶õ¤´Ì¤òÀÑ¤àÆ°ºî (3ÅÀ)~
¡¦2Âæ¤ÎRCX¤Þ¤¿¤ÏNXT¡¢EV3¤ÎÏ¢·È¤ÎÎɤµ(2ÅÀ)~
¡¦¼«Î©·¿¤Î¥í¥Ü¥Ã¥È¤È¤·¤Æ¤Î·Á¤äưºî¤ÎÈþ¤·¤µ¡¢»Â¿·¤µ(2ÅÀ)~
¡¦¤½¤Î¾ (3ÅÀ)~
*¥í¥Ü¥Ã¥È¤Î³µÍ× [#i92d70f2]
**Á´ÂÎ [#w365df76]
#ref(¥À¥¦¥ó¥í¡¼¥É (1).png)
º£²ó¤Î¥í¥Ü¥Ã¥È¤Ï´ðËÜŪ¤Ë¤ÏÁ°²ó¤Î²ÝÂ꤫¤é¤ÎÈ¿¾Ê¤ò¤â¤È¤ËȯŸ¤µ¤»¤¿¤â¤Î¤Ç¤¢¤ë¡¥µ¡ÂΤò°ì¤Ä¤Ë¤¹¤ë¤³¤È¤Ç¥×¥í¥°¥é¥à¤ÎÎ̤äÄ´À°»þ´Ö¤Îû½Ì¤òÌܻؤ·¤¿¡¥
¥«¥ó¤Î°Üư¡¤¥é¥¤¥ó¥È¥ì¡¼¥¹¤ò¤¹¤ëºÝ¤Î¾ã³²¤Ë¤Ê¤é¤Ê¤¤¤è¤¦¤Ë¤Ç¤¤ë¸Â¤ê¾®·¿¤Ç¾²¤ËÂФ·¤Æ¥¹¥Ú¡¼¥¹¤ò¼è¤é¤Ê¤¤¤è¤¦¤Ë¹©Éפ·¤¿¡¥~
Åö½é¤ÏͲ»ÇÈ¥»¥ó¥µ¤Ç¥«¥ó¤Î°ÌÃÖ¤òÆÃÄꤷ¤Æ¹Ô¤¦Í½Äê¤Ç¤¢¤Ã¤¿¤¬¡¤¹½Â¤¾å¤ÎÀÞ¤ê¹ç¤¤¤Ê¤É¤«¤éÃÇǰ¤·¤Æ¤¤¤ë¡¥
**ÇØÌÌ [#qe6d434d]
#ref(¥À¥¦¥ó¥í¡¼¥É.png)
²¼Éô¤¬¥Þ¥¹¥¿¡¼¡¤¾åÉô¤¬¥¹¥ì¥¤¥Ö¤Ç¤¢¤ê¥Þ¥¹¥¿¡¼¤Ë¤Ä¤¤¤Æ¤ÏËÜÂÎ¤Î°ÜÆ°¤Ë¤Ä¤¤¤ÆÃ´Åö¤·¥¹¥ì¥¤¥Ö¤Ë¤Ä¤¤¤Æ¤Ï¥«¥ó¤ò¶´¤àµ¡¹½¤òôÅö¤·¤Æ¤¤¤ë¡¥~
¸åÎØÉôʬ¤Ï¼ÖÎØ¤À¤È°ÂÄꤻ¤º¥«¥ó¤Î°Üư¤Ë»Ù¾ã¤ò¤¤¿¤¹¤¿¤áË໤¤¬¤Ç¤¤ë¤À¤±¾¯¤Ê¤¯¤Ê¤ë¤è¤¦¤Ê¥Ñ¡¼¥Ä¤òÀßÃÖ¤µ¤»¤Æ¤¤¤ë¡¥·ë²ÌŪ¤Ë¤³¤ì¤¬¥Ö¥ì¡¼¥¤Î¤è¤¦¤ÊÌò³ä¤Ë¤Ê¤ê¥â¡¼¥¿¤òÄä»ß¤·¤¿»þ¤Î¥Ö¥ì¤ò¾¯¤Ê¤¯¤¹¤ë¤³¤È¤¬½ÐÍ褿¡¥~
**²¼Éô [#hc9877d1]
#ref(¥À¥¦¥ó¥í¡¼¥É (2).png)
°Üư¤Ë¤Ä¤¤¤Æ¤Ï´ðËÜŪ¤ËÁ°Êý¤Ë¤Ä¤±¤Æ¤¤¤ëÀÖ³°Àþ¥»¥ó¥µ¤òÍøÍѤ·¤ÆÁö¹Ô¤·¤Æ¤¤¤ë~
¥â¡¼¥¿¡¼¤Ë¥®¥¢¤ò³ú¤Þ¤»¤ë¤³¤È¤Ç¡¤¥«¥ó¤Î°Üư»þ¤ËËÜÂΤòư¤«¤¹É¬Íפ¬¤Ê¤¯¡¤°ìÅÙ²óž¤Î¼´¤È¤Ê¤ë°ÌÃÖ·èÄꤹ¤ì¤Ð¤¤¤¤¤Î¤Ç;·×¤Ê¥×¥í¥°¥é¥à¤ä¥Ö¥ì¤ò¾¯¤Ê¤¯¤·¤Æ¤¤¤ë¡¥~
¤Þ¤¿¸ºÂ®¥®¥¢¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤«¤éµÞ¤Êư¤¤òÍÞ¤¨¤ë¤³¤È¤¬¤Ç¤¡¤ÆÃ¤ËµÞ¥«¡¼¥Ö¤ÎºÝ¤ä¥«¥ó¤òÄϤàºÝ¤Î¼ºÇÔ¤òÍÞ¤¨¤Æ¤¤¤ë¡¥
**¤Ï¤µ¤ß [#w8cde3e0]
#ref(¥À¥¦¥ó¥í¡¼¥É (3).png)
¥®¥¢¤òÄɲ乤뤳¤È¤Çº¸±¦¤Î¤Ï¤µ¤ß¤¬Æ±¤¸³ÑÅÙ¤ÇÆ°¤¯¤è¤¦¤Ë¤·¤¿¡¥~
¥«¥ó¤Î»ý¤Á¾å¤²¡¤²¼¤¹Æ°ºî¤Î¥ß¥¹¤ò¸º¤é¤¹¤¿¤á¤Ë¶´¤à¤À¤±¤Ç¤Ê¤¯¾å²¼¤Ë¤âưºî¤¹¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡¥~
¥«¥ó¤ò¶´¤ó¤Ç¤¤¤ë´Ö¥â¡¼¥¿¡¼¤ÏÄä»ß¤·¤Æ¤¤¤ë¤Î¤Ç¡¤¤½¤Î´Ö¤ÎÎϤòÎØ¥´¥à¤ÎÃÆÀÎϤǤæ¤È¤ê¤ò»ý¤¿¤»Êä¤Ã¤Æ¤¤¤ë¡¥(¥´¥à¥¿¥¤¥ä¤À¤±¤Ç¤ÏÉÔ½½Ê¬¤Ç¤¢¤Ã¤¿¡Ë
**¦ÌÌ [#oef6af71]
#ref(¥À¥¦¥ó¥í¡¼¥É (4).png)
ËÜÂÎÆó¤Ä¤Î½Å¤µ¤ÏÈó¾ï¤ËÂ礤¤¤¿¤á¡¤¹äÀ¡Ê¥Ö¥ì¡Ë¤ËÃí°Õ¤·¤Æ¥í¥Ü¥Ã¥È¤òºî¤ëɬÍפ¬¤¢¤Ã¤¿¡¥¤½¤Î¤¿¤áËÜÂΡ¤¥â¡¼¥¿¡¼¤È¤â¶¯ÎϤËÀܳ¤µ¤ì¤Æ¤¤¤ë¡¥
*Àïά [#p5980b45]
#ref(InkedInked2018a-mission3_LI.jpg)
¥í¥Ü¥Ã¥È¤Î³µÍפÇÀâÌÀ¤·¤¿Ä̤ê²óž»þ¤Ë¤Ï¤µ¤ß¤Î°ÌÃÖ¤¬¤½¤Î¤Þ¤Þ¤Ë¤Ê¤ë¹½Â¤¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤Ç¡¤G¤ËÅþÃ夷¤¿»þÅÀ¤«¤é²óž¤Î¤ß¤Ç¥«¥ó¤Î°Üư¤ò¹Ô¤¦¤è¤¦¤Ë¤·¤¿¡¥~
¥«¥ó¤ò½Å¤Í¤ÆÃÖ¤¯ºÝ¤Î°ÌÃ֤ϥ⡼¥¿¡¼¤Î³ÑÅ٤ʤɤÇÄ´À°¤·¤¿¤¬´ðËܱ¿Ç¤¤»¤Ç¤¢¤Ã¤¿¡¥~
¡ÀÄÌð°õ¤Î¤¸¤Æ¤ó¤ÇY¤ÎÆóÃÊÌܤò¤Ï¤µ¤ßÉôʬ¤ÇÈô¤Ð¤¹¡¥~
¢GÃÏÅÀ¤ËÅþÃå~
£X¤ÎÆóÃÊÌܤòÄϤߡ¤»°ÃÊÌܤˤĤ¤¤Æ¤Ï²óž¤¹¤ëºÝ¤Î±ó¿´ÎϤÇÈô¤Ð¤¹¡¥^
¤Y¤ÎÆóÃÊÌܤˣ¤ÇÄϤó¤À¥«¥ó¤ò¾è¤»¤ë¡¥~
i°Ê¾å¤Î£±¡Á£´¤ÇÆóÃʡܰìÃÊ¤ÎÆÀÅÀ¡¥
*¥×¥í¥°¥é¥à [#w7994b46]
**¥Þ¥¹¥¿¡¼¡Ê¶îưÉô¡Ë [#v9bb2783]
#define CONN 1 // ¥¹¥ì¡¼¥Ö¤ÎÀܳÈÖ¹æ
#define SIGNALON 11 // ¥Ï¥µ¥ß¤Ç»ý¤Á¾å¤²¤ë¤¿¤á¤Î¥á¥Ã¥»¡¼¥¸
#define SIGNALOFF 12 // ´Ì¤òÍî¤È¤¹¤¿¤á¤Î¥á¥Ã¥»¡¼¥¸
#define llt OnFwd(OUT_A,50); OnRev(OUT_C,30); Wait(1);//Â礤¯º¸¤Ë²ó¤ë
#define lrt OnRev(OUT_A,30); OnFwd(OUT_C,50); Wait(1);//Â礤¯±¦¤Ë²ó¤ë
#define ternleft OnFwd(OUT_A,50); OnRev(OUT_C,10);//º¸¤Ë²ó¤ë
#define ternright OnRev(OUT_A,10); OnFwd(OUT_C,50);//±¦¤Ë²ó¤ë
#define go OnFwd(OUT_A,50); OnFwd(OUT_C,50);//ľ¿Ê¤¹¤ë
#define back OnRev(OUT_A,50); OnRev(OUT_C,50);//¸åÂह¤ë
#define trase_R {if(SENSOR_2<36){lrt; n++;} else if(SENSOR_2<50) {go; n=0;} else {llt;
n=0;}} //±¦Â¦¥È¥ì¡¼¥¹
#define trase_L {if(SENSOR_2<36){llt; n++;} else if(SENSOR_2<50) {go; n=0;} else {lrt;
n=0;}} //º¸Â¦¥È¥ì¡¼¥¹
#define open RotateMotor(OUT_B,25,80); Off(OUT_B);Wait(1000); //¥Ï¥µ¥ß³«¤¯
#define close RotateMotor(OUT_B,25,-80); Off(OUT_B);Wait(1000); //¥Ï¥µ¥ßÊĤ¸¤ë
#define UP RotateMotor(OUT_C,40,90); Off(OUT_C); Wait(1000); //¥Ï¥µ¥ß»ý¤Á¾å¤²
#define DOWN RotateMotor(OUT_C,20,-100);Off(OUT_C); Wait(1000); //¥Ï¥µ¥ß²¼¤²
task main()
{
SetSensorLowspeed(S1);
SetSensorLight(S2);
int n=0;
while(n<=100)
{ // H
trase_R;
}
Off(OUT_AC);
Wait(1000);
OnFwdSync(OUT_AC, 50, 0);
Wait(500);
Off(OUT_AC);
n=0;
while(n<=100)
{ // s2
trase_R;
}
Off(OUT_AC);
Wait(1000);
OnFwd(OUT_AC,50); //Àþ¤ò¤Þ¤¿¤°
Wait(500);
n=0;
while(n<=90)
{
trase_L //L»úÏ©¤Ç»ß¤Þ¤ë
}
Off(OUT_AC);
Wait(1000);
RotateMotor(OUT_A, 60, 300);
Off(OUT_AC);
n=0;
while(n<=150)
{ //½½»úÏ©¤Ç»ß¤Þ¤ë
trase_R
}
Off(OUT_AC);
Wait(1000);
RotateMotor(OUT_C, 60, 300);
Off(OUT_AC);
n=0;
while(n<=70)
{ //F¤Ç»ß¤Þ¤ë
trase_L
}
Off(OUT_AC);
close;
SendRemoteNumber(CONN,MAILBOX1,SIGNALON); //»ý¤Á¾å¤²¤ë
Off(OUT_ABC);
Wait(3000);
OnRev(OUT_AC,50); //¥Ð¥Ã¥¯¤Çµ÷Î¥¤ò¼è¤ë
Wait(1000);
Off(OUT_AC);
RotateMotorEx(OUT_AC, 75, 1860, 100, true, false); //¿¶¤êÊÖ¤ë
Off(OUT_AC);
n=0;
while(n<=70)
{ //G¤Ç»ß¤Þ¤ë
trase_L
}
Off(OUT_AC);
RotateMotorEx(OUT_AC, 75, 400, -100, true, false );
Off(OUT_AC);
SendRemoteNumber(CONN,MAILBOX1,SIGNALOFF);
Off(OUT_ABC);
Wait(3000);
open;
Off(OUT_ABC);
Wait(3000);
}
**²òÀâ [#c9892174]
¥Þ¥¹¥¿¡¼Â¦¤Ï¥é¥¤¥ó¥È¥ì¡¼¥¹¤ò´ðËܤȤ·¤Æ¤ª¤ê¡¤½çÈÖ¤ËÊÌ¡¹¤ÎȽÄê¤òÍѰդ·Æ°ºî¤µ¤»¤Æ¤¤¤ë¡¥¥«¥ó¤Î°ÌÃÖ¤ÎȽÄê¤ä¸òº¹ÅÀ¤Ï¸òº¹ÅÀ¾å¤Ë°ÌÃÖ¤¹¤ë¤¿¤á¡¤¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î¹õȽÄê¤Î»þ´Ö¤ÇȽÄꤷ¤Æ¤¤¤ë¤¬¡¤³°³¦¤Î¾õ¶·¤òÃΤë½Ñ¤¬ÀÖ³°Àþ¥»¥ó¥µ¤Î¤ß¤Ç¤¢¤ë¤¿¤á¸íưºî¤¬Â¿È¯¤·¤¿¡¥¤¬¡¤¤«¤Ê¤ê´°À®·Á¤Ë¤Ï¶á¤Å¤¯¤³¤È¤¬½ÐÍ褿¤Î¤ÇͲ»ÇÈ¥»¥ó¥µ¤ò»È¤¨¤ÐÄ´À°¤Î»þ´Ö¤òû½Ì¤Ç¤¤¿²ÄǽÀ¤¬¤¢¤ë¡¥
**¥¹¥ì¥¤¥Ö¡¡¡Ê¥Ï¥µ¥ßÉô¡Ë [#rbb6e549]
#define CONN 1 // ¥¹¥ì¡¼¥Ö¤ÎÀܳÈÖ¹æ
#define SIGNALON 11 // ¥Ï¥µ¥ß¤Ç»ý¤Á¾å¤²¤ë¤¿¤á¤Î¥á¥Ã¥»¡¼¥¸
#define SIGNALOFF 12 // ´Ì¤òÍî¤È¤¹¤¿¤á¤Î¥á¥Ã¥»¡¼¥¸
#define llt OnFwd(OUT_A,50); OnRev(OUT_C,30); Wait(1);//Â礤¯º¸¤Ë²ó¤ë
#define lrt OnRev(OUT_A,30); OnFwd(OUT_C,50); Wait(1);//Â礤¯±¦¤Ë²ó¤ë
#define ternleft OnFwd(OUT_A,50); OnRev(OUT_C,10);//º¸¤Ë²ó¤ë
#define ternright OnRev(OUT_A,10); OnFwd(OUT_C,50);//±¦¤Ë²ó¤ë
#define go OnFwd(OUT_A,50); OnFwd(OUT_C,50);//ľ¿Ê¤¹¤ë
#define back OnRev(OUT_A,50); OnRev(OUT_C,50);//¸åÂह¤ë
#define trase_R {if(SENSOR_2<35){lrt; n++;} else if(SENSOR_2<50) {go; n=0;} else {llt;
n=0;}}
#define trase_L {if(SENSOR_2<35){llt; n++;} else if(SENSOR_2<50) {go; n=0;} else {lrt;
n=0;}}
#define open RotateMotor(OUT_B,25,85); Off(OUT_B);Wait(1000);
#define close RotateMotor(OUT_B,25,-85); Off(OUT_B);Wait(1000);
#define UP RotateMotor(OUT_C,40,90); Off(OUT_C); Wait(1000);
#define DOWN RotateMotor(OUT_C,20,-90);Off(OUT_C); Wait(1000);
task main ()
{
int msg; // ¼õ¤±¼è¤Ã¤¿Ãͤò³ÊǼ¤¹¤ëÊÑ¿ô
while (true) {
ReceiveRemoteNumber(MAILBOX1,true,msg); //
if (msg == SIGNALON) {
UP;
}
if (msg == SIGNALOFF) {
DOWN;
}
}
}
**²òÀâ [#k898b9d7]
¥¹¥ì¥¤¥Ö¦¤Ï¥Þ¥¹¥¿¡¼¤ÎÌ¿Îá¤ò¼õ¤±¤Æ¤Ï¤µ¤ß¤òư¤«¤¹Éôʬ¤òôÅö¤·¤Æ¤¤¤ë¡¥
*·ë²Ì¤ÈÈ¿¾ÊÅÀ [#t68b5ff6]
¥í¥Ü¥Ã¥È¤ÎÀ½ºîÃʳ¬¤Ç¤ÏÀïάÄ̤êÀ®¸ù¤·¤Æ¤¤¤¿¤¬¡¤¥í¥Ü¥³¥óËÜÈ֤ǤÏGÃÏÅÀ¤ò¤¦¤Þ¤¯Ç§¼±¤Ç¤¤Ê¤«¤Ã¤¿¤¬¤¿¤á¤Ë°ì¤Ä¤â°Üư¤¹¤ë¤³¤È¤¬½ÐÍè¤Ê¤«¤Ã¤¿¡¥GÃÏÅÀ¤Îǧ¼±¤Ï¶Ê¤¬¤ê³Ñ¤«¤é¤Î»þ´Ö¤ÇȽÄꤷ¤¿¤¬»þ´Ö¤Î·Ð²á¤ä²¿¤é¤«¤Î¸¶°ø¤ÇÄ´À°¤¬Êø¤ì¤Æ¤·¤Þ¤Ã¤¿¤è¤¦¤Ç¤¢¤ë¡¥~
¥í¥Ü¥Ã¥È¤ä¥×¥í¥°¥é¥à¤Ë¤âÈ¿¾ÊÅÀ¤Ï¤¢¤ë¤¬¤³¤Î¤è¤¦¤Ê½éÊâŪ¤Ê¼ºÇÔ¤òÈȤ·¤Æ¤·¤Þ¤Ã¤¿¤Î¤Ï¡¤¥×¥í¥°¥é¥àÈɤȥí¥Ü¥Ã¥ÈÈɤȤ¤¤¦É÷¤Ëʬ¤±·ë²Ì°Õ»×¤ÎÁÂÄ̤¬Á¤«¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¤«¤é¤À¤È»×¤¤¤Þ¤¹¡¥¼«Ê¬¤¿¤Á¤Î¤ä¤ë¤Ù¤¤³¤È¤À¤±¤ò¤ä¤Ã¤ÆÈ¾¤Ð¿ÍǤ¤»¤Î¤è¤¦¤Ê·Á¤Ë¤Ê¤Ã¤¿¤³¤È¤¬¡¤»þ´Ö¤Î¤ê¤Ê¤¤Ãæ¤Ç¤Îºî¶È¤ËÈó¾ï¤ËÈó¸úΨŪ¤Ç¤¢¤Ã¤¿¡¥~
£°ÅÀ¤È¤¤¤¦·ë²Ì¤Ë½ª¤ï¤Ã¤Æ¤·¤Þ¤Ã¤¿¤³¤È¤ÏÈó¾ï¤Ë»Äǰ¤Ç¤Ê¤ê¤Þ¤»¤ó¡¥µ»½ÑÅÀ¤Ë¤Ä¤¤¤Æ¤âÀâÌÀÉÔ¤ÇÅÀ¿ô¤¬¤â¤é¤¨¤º¡¤¾åµ¤Î¥®¥¢¤ä¤Ï¤µ¤ß¤Ë¤Ä¤¤¤Æ¤â¤·¤Ã¤«¤êÀâÌÀ¤¹¤ë¤Ù¤¤Ç¤¢¤Ã¤¿¤ÈÈ¿¾Ê¤·¤Æ¤¤¤Þ¤¹¡¥~
½ªÎ»¹Ô:
[[2018a/MemberOnly]]
²ÝÂꣳ
*¥³¡¼¥¹¡¦¥ë¡¼¥ë [#gaf3043d]
#ref(2018a-mission3.png)
¡¦¶¥µ»»þ´Ö¤Ï¿³È½¤¬Â³¹ÔÉÔǽ¤ÈȽÃǤ¹¤ë¤Þ¤Ç¡¢¤¢¤ë¤¤¤Ï¥ê¥¿¥¤¥¢¤¹¤ë¤Þ¤Ç¡£
¡¦¿Þ¤ÎAÃÏÅÀ¤Þ¤¿¤Ï¡Ê¤ª¤è¤Ó¡ËA'ÃÏÅÀ¤«¤é¥¹¥¿¡¼¥È¤¹¤ë¡£¤¿¤À¤·ÀÜÃϤ·¤Æ¤¤¤ëÉôʬ¤Ï¤½¤ì¤¾¤ì¤ÎÎΰèÆâ¤Ë¼ý¤Þ¤ë¤â¤Î¤È¤¹¤ë¡ÊÀþ¾å¤ÏOK¡Ë¡£~
¡¦¾å¶õÉôʬ¤ÏÎΰ褫¤é¤Ï¤ß½Ð¤·¤Æ¤¤¤Æ¤â¤è¤¤¡£~
¡¦A¥¿¥¤¥×¤Î¶õ¤´Ì¤ò±ßYÆâ¤Ë¡¢B¥¿¥¤¥×¤Î¶õ¤´Ì¤ò±ßXÆâ¤Ë±¿¤Ö¡£~
¡¦³«»Ï¤Î¹ç¿Þ¤«¤é£µÉÃ°ÊÆâ¤Ë¥¹¥¿¡¼¥È¥Ü¥¿¥ó¤ò²¡¤¹ºî¶È¤ò´°Î»¤¹¤ë¤³¤È¡£~
¡¦¶¥µ»¤¬½ªÎ»¤¹¤ë¤Þ¤Ç¡¢¥í¥Ü¥Ã¥È¤Ë¿¨¤Ã¤¿¤ê¿Í´Ö¤¬±ó³Ö¤ÇÁàºî¤·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£~
¡¦ÅÓÃæ¤Ç¤¦¤Þ¤¯Æ°¤«¤Ê¤¯¤Ê¤Ã¤¿¾ì¹ç¡¢£±²ó¸Â¤êºÆ¥¹¥¿¡¼¥È¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡ÊºÆ¥¹¥¿¡¼¥È¤ÎºÝ¤ËÊÌ¥×¥í¥°¥é¥à¤Çµ¯Æ°¤·¤Æ¤è¤¤¡Ë¡£~
´ðËÜÆÀÅÀ¤Î·×»»ÊýË¡~
¡¦±¿¤ó¤À¶õ¤´Ì¤Î¿ô¡ß3ÅÀ~
¡¦¶õ¤´Ì¤òÀѤ߽ŤͤÆÃÖ¤¯¤³¤È¤¬¤Ç¤¤Ð¾ì¹ç¡¢2ÃÊÌܤζõ¤´Ì°ì¤Ä¤Ë¤Ä¤2ÅÀ²Ã»»¡¢3ÃÊÌܤζõ¤´Ì°ì¤Ä¤Ë¤Ä¤3ÅÀ²Ã»»¤¹¤ë¡£~
¡¦±ßÆâ¤«¤é¤Ï¤ß½Ð¤·¤Æ¤¤¤ë¾ì¹ç¡¢È¾Ê¬°Ê²¼¤Ê¤é1ÅÀ¸ºÅÀ¡¢È¾Ê¬°Ê¾å¤Ê¤é2ÅÀ¸ºÅÀ¡£~
¡¦´Ö°ã¤Ã¤¿±ßÆâ¤Ë¶õ¤´Ì¤òÃÖ¤¤¤¿¾ì¹ç¤Ï¡¢1¸Ä¤Ë¤Ä¤1ÅÀ¸ºÅÀ¡£~
¡¦´Ö°ã¤Ã¤¿±ßÆâ¤Î2ÃÊÌܤ˶õ¤´Ì¤òÃÖ¤¤¤¿¾ì¹ç¤Ï1¸Ä¤Ë¤Ä¤3ÅÀ¸ºÅÀ¡¢¤½¤Î¾å¤Ë¤¢¤ë¶õ¤´Ì¤Ï0ÅÀ~
µ»½ÑÅÀ¤Î·×»»ÊýË¡~
°Ê²¼¤Îưºî¤ÎÀºÅÙ¡¦¥¹¥Ô¡¼¥É¡¦³Î¼ÂÀ¤Ê¤É¤ò´Þ¤á¤¿µ»½ÑŪ¤Ê¹©Éפä·Ý½ÑÀ¤Ë¤Ä¤¤¤ÆÂ¾¤ÎÁ´¤Æ¤Î¥Á¡¼¥à(5¥Á¡¼¥à)¤¬20ÅÀËþÅÀ¤ÇºÎÅÀ¤·¡¢¤½¤ÎÊ¿¶ÑÅÀ¤òµá¤á¤ë¡£~
¡¦¶õ¤´Ì¤òõ¤·¼è¤ê¤Ë¤¤¤¯¤Þ¤Ç¤Îưºî (3ÅÀ)~
¡¦¶õ¤´Ì¤òÄÏ¤àÆ°ºî (3ÅÀ)~
¡¦¶õ¤´Ì¤ò±¿¤Öưºî (2ÅÀ)~
¡¦¶õ¤´Ì¤òÃÖ¤¯Æ°ºî (2ÅÀ)~
¡¦¶õ¤´Ì¤òÀÑ¤àÆ°ºî (3ÅÀ)~
¡¦2Âæ¤ÎRCX¤Þ¤¿¤ÏNXT¡¢EV3¤ÎÏ¢·È¤ÎÎɤµ(2ÅÀ)~
¡¦¼«Î©·¿¤Î¥í¥Ü¥Ã¥È¤È¤·¤Æ¤Î·Á¤äưºî¤ÎÈþ¤·¤µ¡¢»Â¿·¤µ(2ÅÀ)~
¡¦¤½¤Î¾ (3ÅÀ)~
*¥í¥Ü¥Ã¥È¤Î³µÍ× [#i92d70f2]
**Á´ÂÎ [#w365df76]
#ref(¥À¥¦¥ó¥í¡¼¥É (1).png)
º£²ó¤Î¥í¥Ü¥Ã¥È¤Ï´ðËÜŪ¤Ë¤ÏÁ°²ó¤Î²ÝÂ꤫¤é¤ÎÈ¿¾Ê¤ò¤â¤È¤ËȯŸ¤µ¤»¤¿¤â¤Î¤Ç¤¢¤ë¡¥µ¡ÂΤò°ì¤Ä¤Ë¤¹¤ë¤³¤È¤Ç¥×¥í¥°¥é¥à¤ÎÎ̤äÄ´À°»þ´Ö¤Îû½Ì¤òÌܻؤ·¤¿¡¥
¥«¥ó¤Î°Üư¡¤¥é¥¤¥ó¥È¥ì¡¼¥¹¤ò¤¹¤ëºÝ¤Î¾ã³²¤Ë¤Ê¤é¤Ê¤¤¤è¤¦¤Ë¤Ç¤¤ë¸Â¤ê¾®·¿¤Ç¾²¤ËÂФ·¤Æ¥¹¥Ú¡¼¥¹¤ò¼è¤é¤Ê¤¤¤è¤¦¤Ë¹©Éפ·¤¿¡¥~
Åö½é¤ÏͲ»ÇÈ¥»¥ó¥µ¤Ç¥«¥ó¤Î°ÌÃÖ¤òÆÃÄꤷ¤Æ¹Ô¤¦Í½Äê¤Ç¤¢¤Ã¤¿¤¬¡¤¹½Â¤¾å¤ÎÀÞ¤ê¹ç¤¤¤Ê¤É¤«¤éÃÇǰ¤·¤Æ¤¤¤ë¡¥
**ÇØÌÌ [#qe6d434d]
#ref(¥À¥¦¥ó¥í¡¼¥É.png)
²¼Éô¤¬¥Þ¥¹¥¿¡¼¡¤¾åÉô¤¬¥¹¥ì¥¤¥Ö¤Ç¤¢¤ê¥Þ¥¹¥¿¡¼¤Ë¤Ä¤¤¤Æ¤ÏËÜÂÎ¤Î°ÜÆ°¤Ë¤Ä¤¤¤ÆÃ´Åö¤·¥¹¥ì¥¤¥Ö¤Ë¤Ä¤¤¤Æ¤Ï¥«¥ó¤ò¶´¤àµ¡¹½¤òôÅö¤·¤Æ¤¤¤ë¡¥~
¸åÎØÉôʬ¤Ï¼ÖÎØ¤À¤È°ÂÄꤻ¤º¥«¥ó¤Î°Üư¤Ë»Ù¾ã¤ò¤¤¿¤¹¤¿¤áË໤¤¬¤Ç¤¤ë¤À¤±¾¯¤Ê¤¯¤Ê¤ë¤è¤¦¤Ê¥Ñ¡¼¥Ä¤òÀßÃÖ¤µ¤»¤Æ¤¤¤ë¡¥·ë²ÌŪ¤Ë¤³¤ì¤¬¥Ö¥ì¡¼¥¤Î¤è¤¦¤ÊÌò³ä¤Ë¤Ê¤ê¥â¡¼¥¿¤òÄä»ß¤·¤¿»þ¤Î¥Ö¥ì¤ò¾¯¤Ê¤¯¤¹¤ë¤³¤È¤¬½ÐÍ褿¡¥~
**²¼Éô [#hc9877d1]
#ref(¥À¥¦¥ó¥í¡¼¥É (2).png)
°Üư¤Ë¤Ä¤¤¤Æ¤Ï´ðËÜŪ¤ËÁ°Êý¤Ë¤Ä¤±¤Æ¤¤¤ëÀÖ³°Àþ¥»¥ó¥µ¤òÍøÍѤ·¤ÆÁö¹Ô¤·¤Æ¤¤¤ë~
¥â¡¼¥¿¡¼¤Ë¥®¥¢¤ò³ú¤Þ¤»¤ë¤³¤È¤Ç¡¤¥«¥ó¤Î°Üư»þ¤ËËÜÂΤòư¤«¤¹É¬Íפ¬¤Ê¤¯¡¤°ìÅÙ²óž¤Î¼´¤È¤Ê¤ë°ÌÃÖ·èÄꤹ¤ì¤Ð¤¤¤¤¤Î¤Ç;·×¤Ê¥×¥í¥°¥é¥à¤ä¥Ö¥ì¤ò¾¯¤Ê¤¯¤·¤Æ¤¤¤ë¡¥~
¤Þ¤¿¸ºÂ®¥®¥¢¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤«¤éµÞ¤Êư¤¤òÍÞ¤¨¤ë¤³¤È¤¬¤Ç¤¡¤ÆÃ¤ËµÞ¥«¡¼¥Ö¤ÎºÝ¤ä¥«¥ó¤òÄϤàºÝ¤Î¼ºÇÔ¤òÍÞ¤¨¤Æ¤¤¤ë¡¥
**¤Ï¤µ¤ß [#w8cde3e0]
#ref(¥À¥¦¥ó¥í¡¼¥É (3).png)
¥®¥¢¤òÄɲ乤뤳¤È¤Çº¸±¦¤Î¤Ï¤µ¤ß¤¬Æ±¤¸³ÑÅÙ¤ÇÆ°¤¯¤è¤¦¤Ë¤·¤¿¡¥~
¥«¥ó¤Î»ý¤Á¾å¤²¡¤²¼¤¹Æ°ºî¤Î¥ß¥¹¤ò¸º¤é¤¹¤¿¤á¤Ë¶´¤à¤À¤±¤Ç¤Ê¤¯¾å²¼¤Ë¤âưºî¤¹¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡¥~
¥«¥ó¤ò¶´¤ó¤Ç¤¤¤ë´Ö¥â¡¼¥¿¡¼¤ÏÄä»ß¤·¤Æ¤¤¤ë¤Î¤Ç¡¤¤½¤Î´Ö¤ÎÎϤòÎØ¥´¥à¤ÎÃÆÀÎϤǤæ¤È¤ê¤ò»ý¤¿¤»Êä¤Ã¤Æ¤¤¤ë¡¥(¥´¥à¥¿¥¤¥ä¤À¤±¤Ç¤ÏÉÔ½½Ê¬¤Ç¤¢¤Ã¤¿¡Ë
**¦ÌÌ [#oef6af71]
#ref(¥À¥¦¥ó¥í¡¼¥É (4).png)
ËÜÂÎÆó¤Ä¤Î½Å¤µ¤ÏÈó¾ï¤ËÂ礤¤¤¿¤á¡¤¹äÀ¡Ê¥Ö¥ì¡Ë¤ËÃí°Õ¤·¤Æ¥í¥Ü¥Ã¥È¤òºî¤ëɬÍפ¬¤¢¤Ã¤¿¡¥¤½¤Î¤¿¤áËÜÂΡ¤¥â¡¼¥¿¡¼¤È¤â¶¯ÎϤËÀܳ¤µ¤ì¤Æ¤¤¤ë¡¥
*Àïά [#p5980b45]
#ref(InkedInked2018a-mission3_LI.jpg)
¥í¥Ü¥Ã¥È¤Î³µÍפÇÀâÌÀ¤·¤¿Ä̤ê²óž»þ¤Ë¤Ï¤µ¤ß¤Î°ÌÃÖ¤¬¤½¤Î¤Þ¤Þ¤Ë¤Ê¤ë¹½Â¤¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤Ç¡¤G¤ËÅþÃ夷¤¿»þÅÀ¤«¤é²óž¤Î¤ß¤Ç¥«¥ó¤Î°Üư¤ò¹Ô¤¦¤è¤¦¤Ë¤·¤¿¡¥~
¥«¥ó¤ò½Å¤Í¤ÆÃÖ¤¯ºÝ¤Î°ÌÃ֤ϥ⡼¥¿¡¼¤Î³ÑÅ٤ʤɤÇÄ´À°¤·¤¿¤¬´ðËܱ¿Ç¤¤»¤Ç¤¢¤Ã¤¿¡¥~
¡ÀÄÌð°õ¤Î¤¸¤Æ¤ó¤ÇY¤ÎÆóÃÊÌܤò¤Ï¤µ¤ßÉôʬ¤ÇÈô¤Ð¤¹¡¥~
¢GÃÏÅÀ¤ËÅþÃå~
£X¤ÎÆóÃÊÌܤòÄϤߡ¤»°ÃÊÌܤˤĤ¤¤Æ¤Ï²óž¤¹¤ëºÝ¤Î±ó¿´ÎϤÇÈô¤Ð¤¹¡¥^
¤Y¤ÎÆóÃÊÌܤˣ¤ÇÄϤó¤À¥«¥ó¤ò¾è¤»¤ë¡¥~
i°Ê¾å¤Î£±¡Á£´¤ÇÆóÃʡܰìÃÊ¤ÎÆÀÅÀ¡¥
*¥×¥í¥°¥é¥à [#w7994b46]
**¥Þ¥¹¥¿¡¼¡Ê¶îưÉô¡Ë [#v9bb2783]
#define CONN 1 // ¥¹¥ì¡¼¥Ö¤ÎÀܳÈÖ¹æ
#define SIGNALON 11 // ¥Ï¥µ¥ß¤Ç»ý¤Á¾å¤²¤ë¤¿¤á¤Î¥á¥Ã¥»¡¼¥¸
#define SIGNALOFF 12 // ´Ì¤òÍî¤È¤¹¤¿¤á¤Î¥á¥Ã¥»¡¼¥¸
#define llt OnFwd(OUT_A,50); OnRev(OUT_C,30); Wait(1);//Â礤¯º¸¤Ë²ó¤ë
#define lrt OnRev(OUT_A,30); OnFwd(OUT_C,50); Wait(1);//Â礤¯±¦¤Ë²ó¤ë
#define ternleft OnFwd(OUT_A,50); OnRev(OUT_C,10);//º¸¤Ë²ó¤ë
#define ternright OnRev(OUT_A,10); OnFwd(OUT_C,50);//±¦¤Ë²ó¤ë
#define go OnFwd(OUT_A,50); OnFwd(OUT_C,50);//ľ¿Ê¤¹¤ë
#define back OnRev(OUT_A,50); OnRev(OUT_C,50);//¸åÂह¤ë
#define trase_R {if(SENSOR_2<36){lrt; n++;} else if(SENSOR_2<50) {go; n=0;} else {llt;
n=0;}} //±¦Â¦¥È¥ì¡¼¥¹
#define trase_L {if(SENSOR_2<36){llt; n++;} else if(SENSOR_2<50) {go; n=0;} else {lrt;
n=0;}} //º¸Â¦¥È¥ì¡¼¥¹
#define open RotateMotor(OUT_B,25,80); Off(OUT_B);Wait(1000); //¥Ï¥µ¥ß³«¤¯
#define close RotateMotor(OUT_B,25,-80); Off(OUT_B);Wait(1000); //¥Ï¥µ¥ßÊĤ¸¤ë
#define UP RotateMotor(OUT_C,40,90); Off(OUT_C); Wait(1000); //¥Ï¥µ¥ß»ý¤Á¾å¤²
#define DOWN RotateMotor(OUT_C,20,-100);Off(OUT_C); Wait(1000); //¥Ï¥µ¥ß²¼¤²
task main()
{
SetSensorLowspeed(S1);
SetSensorLight(S2);
int n=0;
while(n<=100)
{ // H
trase_R;
}
Off(OUT_AC);
Wait(1000);
OnFwdSync(OUT_AC, 50, 0);
Wait(500);
Off(OUT_AC);
n=0;
while(n<=100)
{ // s2
trase_R;
}
Off(OUT_AC);
Wait(1000);
OnFwd(OUT_AC,50); //Àþ¤ò¤Þ¤¿¤°
Wait(500);
n=0;
while(n<=90)
{
trase_L //L»úÏ©¤Ç»ß¤Þ¤ë
}
Off(OUT_AC);
Wait(1000);
RotateMotor(OUT_A, 60, 300);
Off(OUT_AC);
n=0;
while(n<=150)
{ //½½»úÏ©¤Ç»ß¤Þ¤ë
trase_R
}
Off(OUT_AC);
Wait(1000);
RotateMotor(OUT_C, 60, 300);
Off(OUT_AC);
n=0;
while(n<=70)
{ //F¤Ç»ß¤Þ¤ë
trase_L
}
Off(OUT_AC);
close;
SendRemoteNumber(CONN,MAILBOX1,SIGNALON); //»ý¤Á¾å¤²¤ë
Off(OUT_ABC);
Wait(3000);
OnRev(OUT_AC,50); //¥Ð¥Ã¥¯¤Çµ÷Î¥¤ò¼è¤ë
Wait(1000);
Off(OUT_AC);
RotateMotorEx(OUT_AC, 75, 1860, 100, true, false); //¿¶¤êÊÖ¤ë
Off(OUT_AC);
n=0;
while(n<=70)
{ //G¤Ç»ß¤Þ¤ë
trase_L
}
Off(OUT_AC);
RotateMotorEx(OUT_AC, 75, 400, -100, true, false );
Off(OUT_AC);
SendRemoteNumber(CONN,MAILBOX1,SIGNALOFF);
Off(OUT_ABC);
Wait(3000);
open;
Off(OUT_ABC);
Wait(3000);
}
**²òÀâ [#c9892174]
¥Þ¥¹¥¿¡¼Â¦¤Ï¥é¥¤¥ó¥È¥ì¡¼¥¹¤ò´ðËܤȤ·¤Æ¤ª¤ê¡¤½çÈÖ¤ËÊÌ¡¹¤ÎȽÄê¤òÍѰդ·Æ°ºî¤µ¤»¤Æ¤¤¤ë¡¥¥«¥ó¤Î°ÌÃÖ¤ÎȽÄê¤ä¸òº¹ÅÀ¤Ï¸òº¹ÅÀ¾å¤Ë°ÌÃÖ¤¹¤ë¤¿¤á¡¤¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î¹õȽÄê¤Î»þ´Ö¤ÇȽÄꤷ¤Æ¤¤¤ë¤¬¡¤³°³¦¤Î¾õ¶·¤òÃΤë½Ñ¤¬ÀÖ³°Àþ¥»¥ó¥µ¤Î¤ß¤Ç¤¢¤ë¤¿¤á¸íưºî¤¬Â¿È¯¤·¤¿¡¥¤¬¡¤¤«¤Ê¤ê´°À®·Á¤Ë¤Ï¶á¤Å¤¯¤³¤È¤¬½ÐÍ褿¤Î¤ÇͲ»ÇÈ¥»¥ó¥µ¤ò»È¤¨¤ÐÄ´À°¤Î»þ´Ö¤òû½Ì¤Ç¤¤¿²ÄǽÀ¤¬¤¢¤ë¡¥
**¥¹¥ì¥¤¥Ö¡¡¡Ê¥Ï¥µ¥ßÉô¡Ë [#rbb6e549]
#define CONN 1 // ¥¹¥ì¡¼¥Ö¤ÎÀܳÈÖ¹æ
#define SIGNALON 11 // ¥Ï¥µ¥ß¤Ç»ý¤Á¾å¤²¤ë¤¿¤á¤Î¥á¥Ã¥»¡¼¥¸
#define SIGNALOFF 12 // ´Ì¤òÍî¤È¤¹¤¿¤á¤Î¥á¥Ã¥»¡¼¥¸
#define llt OnFwd(OUT_A,50); OnRev(OUT_C,30); Wait(1);//Â礤¯º¸¤Ë²ó¤ë
#define lrt OnRev(OUT_A,30); OnFwd(OUT_C,50); Wait(1);//Â礤¯±¦¤Ë²ó¤ë
#define ternleft OnFwd(OUT_A,50); OnRev(OUT_C,10);//º¸¤Ë²ó¤ë
#define ternright OnRev(OUT_A,10); OnFwd(OUT_C,50);//±¦¤Ë²ó¤ë
#define go OnFwd(OUT_A,50); OnFwd(OUT_C,50);//ľ¿Ê¤¹¤ë
#define back OnRev(OUT_A,50); OnRev(OUT_C,50);//¸åÂह¤ë
#define trase_R {if(SENSOR_2<35){lrt; n++;} else if(SENSOR_2<50) {go; n=0;} else {llt;
n=0;}}
#define trase_L {if(SENSOR_2<35){llt; n++;} else if(SENSOR_2<50) {go; n=0;} else {lrt;
n=0;}}
#define open RotateMotor(OUT_B,25,85); Off(OUT_B);Wait(1000);
#define close RotateMotor(OUT_B,25,-85); Off(OUT_B);Wait(1000);
#define UP RotateMotor(OUT_C,40,90); Off(OUT_C); Wait(1000);
#define DOWN RotateMotor(OUT_C,20,-90);Off(OUT_C); Wait(1000);
task main ()
{
int msg; // ¼õ¤±¼è¤Ã¤¿Ãͤò³ÊǼ¤¹¤ëÊÑ¿ô
while (true) {
ReceiveRemoteNumber(MAILBOX1,true,msg); //
if (msg == SIGNALON) {
UP;
}
if (msg == SIGNALOFF) {
DOWN;
}
}
}
**²òÀâ [#k898b9d7]
¥¹¥ì¥¤¥Ö¦¤Ï¥Þ¥¹¥¿¡¼¤ÎÌ¿Îá¤ò¼õ¤±¤Æ¤Ï¤µ¤ß¤òư¤«¤¹Éôʬ¤òôÅö¤·¤Æ¤¤¤ë¡¥
*·ë²Ì¤ÈÈ¿¾ÊÅÀ [#t68b5ff6]
¥í¥Ü¥Ã¥È¤ÎÀ½ºîÃʳ¬¤Ç¤ÏÀïάÄ̤êÀ®¸ù¤·¤Æ¤¤¤¿¤¬¡¤¥í¥Ü¥³¥óËÜÈ֤ǤÏGÃÏÅÀ¤ò¤¦¤Þ¤¯Ç§¼±¤Ç¤¤Ê¤«¤Ã¤¿¤¬¤¿¤á¤Ë°ì¤Ä¤â°Üư¤¹¤ë¤³¤È¤¬½ÐÍè¤Ê¤«¤Ã¤¿¡¥GÃÏÅÀ¤Îǧ¼±¤Ï¶Ê¤¬¤ê³Ñ¤«¤é¤Î»þ´Ö¤ÇȽÄꤷ¤¿¤¬»þ´Ö¤Î·Ð²á¤ä²¿¤é¤«¤Î¸¶°ø¤ÇÄ´À°¤¬Êø¤ì¤Æ¤·¤Þ¤Ã¤¿¤è¤¦¤Ç¤¢¤ë¡¥~
¥í¥Ü¥Ã¥È¤ä¥×¥í¥°¥é¥à¤Ë¤âÈ¿¾ÊÅÀ¤Ï¤¢¤ë¤¬¤³¤Î¤è¤¦¤Ê½éÊâŪ¤Ê¼ºÇÔ¤òÈȤ·¤Æ¤·¤Þ¤Ã¤¿¤Î¤Ï¡¤¥×¥í¥°¥é¥àÈɤȥí¥Ü¥Ã¥ÈÈɤȤ¤¤¦É÷¤Ëʬ¤±·ë²Ì°Õ»×¤ÎÁÂÄ̤¬Á¤«¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¤«¤é¤À¤È»×¤¤¤Þ¤¹¡¥¼«Ê¬¤¿¤Á¤Î¤ä¤ë¤Ù¤¤³¤È¤À¤±¤ò¤ä¤Ã¤ÆÈ¾¤Ð¿ÍǤ¤»¤Î¤è¤¦¤Ê·Á¤Ë¤Ê¤Ã¤¿¤³¤È¤¬¡¤»þ´Ö¤Î¤ê¤Ê¤¤Ãæ¤Ç¤Îºî¶È¤ËÈó¾ï¤ËÈó¸úΨŪ¤Ç¤¢¤Ã¤¿¡¥~
£°ÅÀ¤È¤¤¤¦·ë²Ì¤Ë½ª¤ï¤Ã¤Æ¤·¤Þ¤Ã¤¿¤³¤È¤ÏÈó¾ï¤Ë»Äǰ¤Ç¤Ê¤ê¤Þ¤»¤ó¡¥µ»½ÑÅÀ¤Ë¤Ä¤¤¤Æ¤âÀâÌÀÉÔ¤ÇÅÀ¿ô¤¬¤â¤é¤¨¤º¡¤¾åµ¤Î¥®¥¢¤ä¤Ï¤µ¤ß¤Ë¤Ä¤¤¤Æ¤â¤·¤Ã¤«¤êÀâÌÀ¤¹¤ë¤Ù¤¤Ç¤¢¤Ã¤¿¤ÈÈ¿¾Ê¤·¤Æ¤¤¤Þ¤¹¡¥~
¥Ú¡¼¥¸Ì¾: