|
#define RotateMotorEx |
( |
_ports, |
|
|
_pwr, |
|
|
_angle, |
|
|
_turnpct, |
|
|
_bSync, |
|
|
_bStop |
|
) |
__RotateMotorExPID(_ports, _pwr, _angle, _turnpct, _bSync, _bStop, PID_1, PID_0, PID_3) |
Rotate motor.
Run the specified outputs forward for the specified number of degrees.
- Parameters:
-
| _ports | Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. |
| _pwr | Output power, 0 to 100. Can be negative to reverse direction. |
| _angle | Angle limit, in degree. Can be negative to reverse direction. |
| _turnpct | Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. |
| _bSync | Synchronise two motors. Should be set to true if a non-zero turn percent is specified or no turning will occur. |
| _bStop | Specify whether the motor(s) should brake at the end of the rotation. |
|