|
|
| (11 intermediate revisions by one user not shown) |
| Line 1: |
Line 1: |
| − | {| style="font-family:Verdana, Genega, sans-sarif; font-size:80%;color:gray;" width="100%" cellpadding="0%" cellspacing="0" border="0"
| + | <yambe:breadcrumb self="Natural Language">VEX2|CORTEX</yambe:breadcrumb> |
| − | |-
| + | <br /> |
| − | |
| + | |
| − | ''[[Main_Page|Main]] → [[VEX2_Main|CORTEX]] → [[VEX2:_Natural_Language| Natural Language]]''
| + | |
| − | |-
| + | |
| − | |}
| + | |
| | | | |
| − | | + | {| |
| − | {| class="wikiText" | + | |
| | |- | | |- |
| | |The ROBOTC Natural Language Library aims at making learning and using text-based programming languages easier for beginners. The Natural Language Library is filled with commands that are both easy to use and easy to remember. Natural Language commands encompass entire robot behaviors into a single command. | | |The ROBOTC Natural Language Library aims at making learning and using text-based programming languages easier for beginners. The Natural Language Library is filled with commands that are both easy to use and easy to remember. Natural Language commands encompass entire robot behaviors into a single command. |
| Line 14: |
Line 9: |
| | |- | | |- |
| | |} | | |} |
| | + | <br /> |
| | | | |
| − | {| | + | {{tl|1|1}} |
| − | |-
| + | <br /> |
| − | |style="vertical-align:top"| __TOC__
| + | |
| − | |style="vertical-align:top"|
| + | |
| − | {| width="100" cellpadding="2" cellspacing="0" style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000"
| + | |
| − | !colspan="2" class="wikiHeader"|Color Key
| + | |
| − | |-
| + | |
| − | |class="wikiText" width="75%" style="border-style: solid; border-width: 1px 0px 0px 0px"|Function:
| + | |
| − | |width="25%" style="border-style: solid; border-width: 1px 0px 0px 0px;" class="colorKeyFunc"|
| + | |
| − | |-
| + | |
| − | |class="wikiText" width="75%" style="border-style: solid; border-width: 0px 0px 0px 0px"|Variable:
| + | |
| − | |width="25%" style="border-style: solid; border-width: 0px 0px 0px 0px;" class="colorKeyVar"|
| + | |
| − | |}
| + | |
| − | |-
| + | |
| − | |}
| + | |
| − | | + | |
| | | | |
| | == Video == | | == Video == |
| Line 1,208: |
Line 1,190: |
| | |- | | |- |
| | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''sensorPort'' | | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''sensorPort'' |
| − | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The sensor port to use for the light sensor.<br />(default: <span class="codeStringsNums">dgtl6</span>) | + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The sensor port to use for the touch sensor.<br />(default: <span class="codeStringsNums">dgtl6</span>) |
| | | style="border-style: solid; border-width: 1px 0px 0px 0px"|<span class="codeStringsNums">dgtl1</span> to <span class="codeStringsNums">dgtl12</span><br />Or their names setup in Motors and Sensors Setup. | | | style="border-style: solid; border-width: 1px 0px 0px 0px"|<span class="codeStringsNums">dgtl1</span> to <span class="codeStringsNums">dgtl12</span><br />Or their names setup in Motors and Sensors Setup. |
| | |- | | |- |
| Line 1,264: |
Line 1,246: |
| | |- | | |- |
| | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''sensorPort'' | | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''sensorPort'' |
| − | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The sensor port to use for the light sensor.<br />(default: <span class="codeStringsNums">dgtl6</span>) | + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The sensor port to use for the touch sensor.<br />(default: <span class="codeStringsNums">dgtl6</span>) |
| | | style="border-style: solid; border-width: 1px 0px 0px 0px"|<span class="codeStringsNums">dgtl1</span> to <span class="codeStringsNums">dgtl12</span><br />Or their names setup in Motors and Sensors Setup. | | | style="border-style: solid; border-width: 1px 0px 0px 0px"|<span class="codeStringsNums">dgtl1</span> to <span class="codeStringsNums">dgtl12</span><br />Or their names setup in Motors and Sensors Setup. |
| | |- | | |- |
| Line 1,323: |
Line 1,305: |
| | |- | | |- |
| | | style="border-style: solid; border-width: 1px 0px 1px 0px"|''sensorPort'' | | | style="border-style: solid; border-width: 1px 0px 1px 0px"|''sensorPort'' |
| − | | style="border-style: solid; border-width: 1px 0px 1px 0px"|The sensor port to use for the light sensor.<br />(default: <span class="codeStringsNums">dgtl6</span>) | + | | style="border-style: solid; border-width: 1px 0px 1px 0px"|The sensor port to use for the touch sensor.<br />(default: <span class="codeStringsNums">dgtl6</span>) |
| | | style="border-style: solid; border-width: 1px 0px 1px 0px"|<span class="codeStringsNums">dgtl1</span> to <span class="codeStringsNums">dgtl12</span><br />Or their names setup in Motors and Sensors Setup. | | | style="border-style: solid; border-width: 1px 0px 1px 0px"|<span class="codeStringsNums">dgtl1</span> to <span class="codeStringsNums">dgtl12</span><br />Or their names setup in Motors and Sensors Setup. |
| | |- | | |- |
| Line 1,519: |
Line 1,501: |
| | |- | | |- |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''sensorPort'' | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''sensorPort'' |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The sensor port to use for the sonar sensor.<br />(default: <span class="codeStringsNums">in6</span>) | + | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The sensor port to use for the potentiometer sensor.<br />(default: <span class="codeStringsNums">in6</span>) |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<span class="codeStringsNums">in1</span> to <span class="codeStringsNums">in8</span><br />Or their names setup in Motors and Sensors Setup. | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<span class="codeStringsNums">in1</span> to <span class="codeStringsNums">in8</span><br />Or their names setup in Motors and Sensors Setup. |
| | |- | | |- |
| Line 1,583: |
Line 1,565: |
| | |- | | |- |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''sensorPort'' | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''sensorPort'' |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The sensor port to use for the sonar sensor.<br />(default: <span class="codeStringsNums">in6</span>) | + | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The sensor port to use for the potentiometer sensor.<br />(default: <span class="codeStringsNums">in6</span>) |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<span class="codeStringsNums">in1</span> to <span class="codeStringsNums">in8</span><br />Or their names setup in Motors and Sensors Setup. | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<span class="codeStringsNums">in1</span> to <span class="codeStringsNums">in8</span><br />Or their names setup in Motors and Sensors Setup. |
| | |- | | |- |
| Line 1,706: |
Line 1,688: |
| | |- | | |- |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''sensorPort'' | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''sensorPort'' |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The sensor port to use for the sonar sensor.<br />(default: <span class="codeStringsNums">in2</span>) | + | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The sensor port to use for the potentiometer sensor.<br />(default: <span class="codeStringsNums">in2</span>) |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<span class="codeStringsNums">in1</span> to <span class="codeStringsNums">in8</span><br />Or their names setup in Motors and Sensors Setup. | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<span class="codeStringsNums">in1</span> to <span class="codeStringsNums">in8</span><br />Or their names setup in Motors and Sensors Setup. |
| | |- | | |- |
| Line 1,770: |
Line 1,752: |
| | |- | | |- |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''sensorPort'' | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''sensorPort'' |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The sensor port to use for the sonar sensor.<br />(default: <span class="codeStringsNums">in2</span>) | + | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The sensor port to use for the potentiometer sensor.<br />(default: <span class="codeStringsNums">in2</span>) |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<span class="codeStringsNums">in1</span> to <span class="codeStringsNums">in8</span><br />Or their names setup in Motors and Sensors Setup. | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<span class="codeStringsNums">in1</span> to <span class="codeStringsNums">in8</span><br />Or their names setup in Motors and Sensors Setup. |
| | |- | | |- |
| Line 1,876: |
Line 1,858: |
| | forward(63); // move forward at speed 63 | | forward(63); // move forward at speed 63 |
| | untilRotations(2.75, dgtl3); /* wait until the quadrature encoder in port | | untilRotations(2.75, dgtl3); /* wait until the quadrature encoder in port |
| − | dgtl3 (+ dgtl4)counts 2.75 rotations */ | + | dgtl3 (+ dgtl4) counts 2.75 rotations */ |
| | stop(); // stop | | stop(); // stop |
| | </syntaxhighlight> | | </syntaxhighlight> |
| Line 1,940: |
Line 1,922: |
| | forward(63); // move forward at speed 63 | | forward(63); // move forward at speed 63 |
| | untilEncoderCounts(990, dgtl3); /* wait until the quadrature encoder in port | | untilEncoderCounts(990, dgtl3); /* wait until the quadrature encoder in port |
| − | dgtl3 (+ dgtl4)counts 990 encoder counts */ | + | dgtl3 (+ dgtl4) counts 990 encoder counts */ |
| | stop(); // stop | | stop(); // stop |
| | </syntaxhighlight> | | </syntaxhighlight> |
| Line 2,086: |
Line 2,068: |
| | |- | | |- |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''brightness'' | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|''brightness'' |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The level of brightness to<br />set the VEX Flashlight to.<br />(default: <span class="codeStringsNums">dgtl2</span>) | + | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The level of brightness to<br />set the VEX Flashlight to.<br />(default: <span class="codeStringsNums">63</span>) |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|Any whole integer amount from 0 to 127. | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|Any whole integer amount from 0 to 127. |
| | |- | | |- |