|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.BasicMotor lejos.nxt.NXTMotor
public class NXTMotor
Abstraction for an NXT motor with no speed regulation.
Field Summary | |
---|---|
protected Encoder |
encoderPort
|
Fields inherited from class lejos.nxt.BasicMotor |
---|
INVALID_MODE, mode, port, power |
Constructor Summary | |
---|---|
NXTMotor(TachoMotorPort port)
Create an instance of a NXTMotor using the specified motor port the PWM operating mode will be PWM_BREAK BasicMotorPort.PWM_BRAKE |
|
NXTMotor(TachoMotorPort port,
int PWMMode)
Create an instance of a NXTMotor using the specified motor port and PWM operating mode. |
Method Summary | |
---|---|
int |
getTachoCount()
Returns the tachometer count. |
void |
resetTachoCount()
Reset the tachometer count. |
Methods inherited from class lejos.nxt.BasicMotor |
---|
backward, flt, forward, getPower, isMoving, setPower, stop, updateState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface lejos.robotics.DCMotor |
---|
getPower, setPower |
Methods inherited from interface lejos.robotics.BaseMotor |
---|
backward, flt, forward, isMoving, stop |
Field Detail |
---|
protected Encoder encoderPort
Constructor Detail |
---|
public NXTMotor(TachoMotorPort port, int PWMMode)
port
- The motor port that the motor will be attached to.PWMMode
- see BasicMotorPort.PWM_FLOAT
and see BasicMotorPort.PWM_BRAKE
public NXTMotor(TachoMotorPort port)
BasicMotorPort.PWM_BRAKE
port
- The motor port that the motor will be attached to.Method Detail |
---|
public int getTachoCount()
Encoder
getTachoCount
in interface Encoder
public void resetTachoCount()
Encoder
resetTachoCount
in interface Encoder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |