|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlejos.nxt.I2CSensor
lejos.nxt.addon.LMotor
public class LMotor
Generic abstraction to manage RC Servos and DC Motor. LServo and LDCMotor uses inherits from this class
| Field Summary | |
|---|---|
static int[] |
arrMotorLoad
|
static int[] |
arrMotorUnload
|
protected int |
LSC_position
|
protected byte |
SPI_PORT
|
| Fields inherited from class lejos.nxt.I2CSensor |
|---|
address, BLANK, PRODUCT_ID, SENSOR_TYPE, STOP, VERSION |
| Constructor Summary | |
|---|---|
LMotor(SensorPort port,
int location,
java.lang.String name,
byte SPI_PORT)
Constructor |
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
Get name from a RC Servo or a DC Motor |
protected int |
getPulse()
This method return current pulse over a RC Servo or a DC Motor. |
boolean |
isMoving()
Method to know if Servo is moving to a determinated angle |
void |
load()
Load Servo located in a position X |
void |
setDelay(int delay)
Set a delay in a Motor |
protected void |
setPulse(int pulse)
This class set the Pulse over a RC Servo or a DC Motor |
void |
unload()
|
| Methods inherited from class lejos.nxt.I2CSensor |
|---|
fetchString, getData, getData, getId, getProductID, getSensorType, getVersion, sendData, sendData, setAddress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int LSC_position
protected byte SPI_PORT
public static final int[] arrMotorUnload
public static final int[] arrMotorLoad
| Constructor Detail |
|---|
public LMotor(SensorPort port,
int location,
java.lang.String name,
byte SPI_PORT)
port - the portlocation - the locationname - the name of the servoSPI_PORT - the SPI port| Method Detail |
|---|
public boolean isMoving()
public void setDelay(int delay)
delay - the delaypublic void unload()
public void load()
public java.lang.String getName()
protected void setPulse(int pulse)
pulse - protected int getPulse()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||