Package lejos.hardware.port
Interface BasicMotorPort
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,IOPort
- All Known Subinterfaces:
TachoMotorPort
- All Known Implementing Classes:
PFMotorPort,RCXPlexedMotorPort,RCXRemoteMotorPort,RemoteMotorPort,RemoteNXTMotorPort,RemoteRequestMotorPort
public interface BasicMotorPort extends IOPort
An abstraction for a motor port that supports RCX type motors, but not NXT motors with tachometers.- Author:
- Lawrie Griffiths.
-
-
Field Summary
Fields Modifier and Type Field Description static intBACKWARDMotor is running backwardsstatic intFLOATMotor is floating (no PWM drive)static intFORWARDMotor is running forwardstatic intMAX_POWERMaximum power setting = 100%static intPWM_BRAKEPWM Mode.static intPWM_FLOATPWM Mode.static intSTOPMotor is stopped (PWM drive still applied)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcontrolMotor(int power, int mode)voidsetPWMMode(int mode)-
Methods inherited from interface lejos.hardware.port.IOPort
close, getName, setPinMode
-
-
-
-
Field Detail
-
PWM_FLOAT
static final int PWM_FLOAT
PWM Mode. Motor is not driven during off phase of PWM- See Also:
- Constant Field Values
-
PWM_BRAKE
static final int PWM_BRAKE
PWM Mode. Motor is driven during off phase of PWM- See Also:
- Constant Field Values
-
FORWARD
static final int FORWARD
Motor is running forward- See Also:
- Constant Field Values
-
BACKWARD
static final int BACKWARD
Motor is running backwards- See Also:
- Constant Field Values
-
STOP
static final int STOP
Motor is stopped (PWM drive still applied)- See Also:
- Constant Field Values
-
FLOAT
static final int FLOAT
Motor is floating (no PWM drive)- See Also:
- Constant Field Values
-
MAX_POWER
static final int MAX_POWER
Maximum power setting = 100%- See Also:
- Constant Field Values
-
-