Package lejos.remote.rcx
Class RCXRemoteMotorPort
- java.lang.Object
-
- lejos.remote.rcx.RCXRemoteMotorPort
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,BasicMotorPort,IOPort
public class RCXRemoteMotorPort extends java.lang.Object implements BasicMotorPort
Supports a motor connected to a remote RCX via a mindsensord NRLink adapter- Author:
- Lawrie Griffiths
-
-
Constructor Summary
Constructors Constructor Description RCXRemoteMotorPort(RCXLink link, 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
-
RCXRemoteMotorPort
public RCXRemoteMotorPort(RCXLink link, 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
-
-