public class UnregulatedMotor extends BasicMotor implements EncoderMotor
| Modifier and Type | Field and Description |
|---|---|
protected Encoder |
encoderPort |
INVALID_MODE, mode, port, power| Constructor and Description |
|---|
UnregulatedMotor(Port port)
Create an instance of a NXTMotor using the specified motor port the
PWM operating mode will be PWM_BREAK
BasicMotorPort.PWM_BRAKE |
UnregulatedMotor(Port port,
int PWMMode)
Create an instance of a NXTMotor using the specified motor port and
PWM operating mode.
|
UnregulatedMotor(TachoMotorPort port)
Create an instance of a NXTMotor using the specified motor port the
PWM operating mode will be PWM_BREAK
BasicMotorPort.PWM_BRAKE |
UnregulatedMotor(TachoMotorPort mport,
int PWMMode)
Create an instance of a NXTMotor using the specified motor port and
PWM operating mode.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getTachoCount()
Returns the tachometer count.
|
void |
resetTachoCount()
Reset the tachometer count.
|
backward, flt, forward, getPower, isMoving, setPower, stop, updateStateclose, releaseOnCloseprotected Encoder encoderPort
public UnregulatedMotor(Port port, int PWMMode)
port - The motor port that the motor will be attached to.PWMMode - see BasicMotorPort.PWM_FLOAT and see BasicMotorPort.PWM_BRAKEpublic UnregulatedMotor(Port port)
BasicMotorPort.PWM_BRAKEport - The motor port that the motor will be attached to.public UnregulatedMotor(TachoMotorPort mport, int PWMMode)
mport - The motor port that the motor will be attached to.PWMMode - see BasicMotorPort.PWM_FLOAT and see BasicMotorPort.PWM_BRAKEpublic UnregulatedMotor(TachoMotorPort port)
BasicMotorPort.PWM_BRAKEport - The motor port that the motor will be attached to.public int getTachoCount()
EncodergetTachoCount in interface Encoderpublic void resetTachoCount()
EncoderresetTachoCount in interface Encoder