|
|
| Line 1,287: |
Line 1,287: |
| | | style="border-style: solid; border-width: 1px 0px 1px 0px"|''rotations'' | | | style="border-style: solid; border-width: 1px 0px 1px 0px"|''rotations'' |
| | | style="border-style: solid; border-width: 1px 0px 1px 0px"|The amount of axle rotations to reach.<br />(default: '''''none''''') | | | style="border-style: solid; border-width: 1px 0px 1px 0px"|The amount of axle rotations to reach.<br />(default: '''''none''''') |
| − | | style="border-style: solid; border-width: 1px 0px 1px 0px"|Any floating point amount: | + | | style="border-style: solid; border-width: 1px 0px 1px 0px"|Any whole integer amount from 0 to 32,767. |
| − | {| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#F2F2F2; text-align:left; font-size:100%; border-collapse: separate; border-spacing: 0; border-width: 0px; border-style: solid; border-color: #000;" cellpadding="5%"
| + | |
| − | ! style="border-style: solid; border-width: 0px 0px 0px 0px"|
| + | |
| − | !
| + | |
| − | |-
| + | |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.####
| + | |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|-2,048.0000 to +2,048.0000
| + | |
| − | |-
| + | |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.###
| + | |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|-32,768.000 to +32,768.000
| + | |
| − | |-
| + | |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.##
| + | |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|-262,144.00 to +262,144.00
| + | |
| − | |-
| + | |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|0.#
| + | |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|-2,097,200.0 to +2,097,200.0
| + | |
| − | |-
| + | |
| − | |}
| + | |
| | |- | | |- |
| | | 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 quadrature encoder to use.<br />(default: <span class="codeStringsNums">dgtl1</span> [+ <span class="codeStringsNums">dgtl1</span>]) | + | | style="border-style: solid; border-width: 0px 0px 0px 0px"|The quadrature encoder to use.<br />(default: '''''none''''') |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<span class="codeStringsNums">dgtl1</span> to <span class="codeStringsNums">dgtl11</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">in16</span><br />Or their names setup in Motors and Sensors Setup. |
| − | |-
| + | |
| − | |}
| + | |
| − | |-
| + | |
| − | |
| + | |
| − | {| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%; border-collapse: separate; border-spacing: 0; border-width: 0px; border-style: solid; border-color: #000;" cellpadding="5%"
| + | |
| − | ! style="border-style: solid; border-width: 0px 0px 0px 0px"|Default Usage and Sample
| + | |
| − | |-
| + | |
| − | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<syntaxhighlight lang="ROBOTC">
| + | |
| − | forward();
| + | |
| − | untilRotations(); /* wait until the quadrature encoder in port
| + | |
| − | dgtl1 (+ dgtl2) counts 1.0 rotations (default) */
| + | |
| − | stop();
| + | |
| − | </syntaxhighlight>
| + | |
| | |- | | |- |
| | |} | | |} |
| Line 1,330: |
Line 1,300: |
| | |- | | |- |
| | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<syntaxhighlight lang="ROBOTC"> | | | style="border-style: solid; border-width: 0px 0px 0px 0px"|<syntaxhighlight lang="ROBOTC"> |
| − | forward(63); // move forward at speed 63 | + | forward(63); // move forward at speed 63 |
| − | untilRotations(3, dgtl3); /* wait until the quadrature encoder in port | + | untilRotations(3, in3); /* wait until the quadrature encoder |
| − | dgtl3 (+ dgtl4)counts 3 rotations */
| + | in port in3 counts 3 rotations */ |
| − | stop(); // stop | + | stop(); // stop |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | |- | | |- |