forwardX¶
-
void
forwardX(float percent, float inch)¶ Moves forward in the x axis direction, relative to the robot’s local orientation.
- Parameters
percent: the power for motor 3. Motors 1 & 2 will be set to percent/2. A negative value will move backwards.inch: the distance to move. Must be positive.
Examples¶
1 | forwardX(25.0, 4.0);
|
Moves in the positive local x direction 4 inches, with motor 3 given 25% power.
1 | forwardX(-15.0, 4.0);
|
Moves in the negative local x direction 4 inches, with motor 3 given -15% power.
Function Variables¶
Type |
Name |
Description |
|---|---|---|
|
|
The start time of the function, used for timeout if the motors don’t move. |