|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.nxt.RCXMotor
public class RCXMotor
Abstraction for an RCX motor.
Constructor Summary | |
---|---|
RCXMotor(lejos.nxt.BasicMotorPort port)
|
Method Summary | |
---|---|
void |
backward()
Causes motor to rotate backwards. |
void |
flt()
Causes motor to float. |
void |
forward()
Causes motor to rotate forward. |
int |
getMode()
Returns the mode. |
int |
getPower()
Returns the current power setting. |
boolean |
isBackward()
Return true if motor is backward. |
boolean |
isFloating()
Returns true iff the motor is in float mode. |
boolean |
isForward()
Return true if motor is forward. |
boolean |
isMoving()
Returns true iff the motor is in motion. |
boolean |
isStopped()
Return true if motor is stopped. |
void |
reverseDirection()
Reverses direction of the motor. |
void |
setPower(int power)
Sets power. |
void |
stop()
Causes motor to stop, pretty much instantaneously. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Constructor Detail |
---|
public RCXMotor(lejos.nxt.BasicMotorPort port)
Method Detail |
---|
public void setPower(int power)
power
- power setting: 0 - 100public int getPower()
public void forward()
public boolean isForward()
public void backward()
public boolean isBackward()
public void reverseDirection()
public boolean isMoving()
public void flt()
public boolean isFloating()
public void stop()
public boolean isStopped()
public int getMode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |