public class Motor
extends java.lang.Object
Example:
Motor.A.setSpeed(720);// 2 RPM
Motor.C.setSpeed(720);
Motor.A.forward();
Motor.C.forward();
Thread.sleep (1000);
Motor.A.stop();
Motor.C.stop();
Motor.A.rotateTo( 360);
Motor.A.rotate(-720,true);
while(Motor.A.isMoving() :Thread.yield();
int angle = Motor.A.getTachoCount(); // should be -360
LCD.drawInt(angle,0,0);
Modifier and Type | Field and Description |
---|---|
static NXTRegulatedMotor |
A
Motor A.
|
static NXTRegulatedMotor |
B
Motor B.
|
static NXTRegulatedMotor |
C
Motor C.
|
static NXTRegulatedMotor |
D
Motor D.
|
public static final NXTRegulatedMotor A
public static final NXTRegulatedMotor B
public static final NXTRegulatedMotor C
public static final NXTRegulatedMotor D