Package lejos.hardware.device
Class RCXPlexedMotorPort
- java.lang.Object
-
- lejos.hardware.device.RCXPlexedMotorPort
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,BasicMotorPort,IOPort
public class RCXPlexedMotorPort extends java.lang.Object implements BasicMotorPort
Supports a motor connected to the Mindsensors RCX Motor Multiplexer- Author:
- Lawrie Griffiths
-
-
Constructor Summary
Constructors Constructor Description RCXPlexedMotorPort(RCXMotorMultiplexer plex, int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the port, the port can not be used after this call.voidcontrolMotor(int power, int mode)java.lang.StringgetName()Return the string representing this portbooleansetPinMode(int mode)Set the port pins up ready for use.voidsetPWMMode(int mode)
-
-
-
Constructor Detail
-
RCXPlexedMotorPort
public RCXPlexedMotorPort(RCXMotorMultiplexer plex, int id)
-
-
Method Detail
-
controlMotor
public void controlMotor(int power, int mode)- Specified by:
controlMotorin interfaceBasicMotorPort
-
setPWMMode
public void setPWMMode(int mode)
- Specified by:
setPWMModein interfaceBasicMotorPort
-
close
public void close()
Description copied from interface:IOPortClose the port, the port can not be used after this call.
-
getName
public java.lang.String getName()
Description copied from interface:IOPortReturn the string representing this port
-
setPinMode
public boolean setPinMode(int mode)
Description copied from interface:IOPortSet the port pins up ready for use.- Specified by:
setPinModein interfaceIOPort- Parameters:
mode- The EV3 pin mode- Returns:
- true if the operation succeeds false if it fails
-
-