|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlejos.nxt.I2CSensor
lejos.nxt.addon.LSC
public class LSC
This class has been defined to manage the device LSC, Lattebox Servo Controller which manage until 10 RC Servos / DC Motors
| Field Summary |
|---|
| Fields inherited from class lejos.nxt.I2CSensor |
|---|
address, DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_VENDOR_ID, REG_VERSION |
| Fields inherited from interface lejos.nxt.SensorConstants |
|---|
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, GREEN, GREEN_INDEX, MAX_AD_RAW, MAX_TYPE, MIN_TYPE, MODE_ANGLESTEP, MODE_BOOLEAN, MODE_CELSIUS, MODE_FARENHEIT, MODE_PCTFULLSCALE, MODE_PERIODCOUNTER, MODE_RAW, MODE_TRANSITIONCNT, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HISPEED, TYPE_LIGHT_ACTIVE, TYPE_LIGHT_INACTIVE, TYPE_LOWSPEED, TYPE_LOWSPEED_9V, TYPE_NO_SENSOR, TYPE_REFLECTION, TYPE_SOUND_DB, TYPE_SOUND_DBA, TYPE_SWITCH, TYPE_TEMPERATURE, WHITE, YELLOW |
| Constructor Summary | |
|---|---|
LSC(SensorPort port,
byte SPI_PORT)
Constructor |
|
| Method Summary | |
|---|---|
void |
addDCMotor(int location,
java.lang.String name)
Method to add a DC Motor |
void |
addDCMotor(int location,
java.lang.String name,
int forward_min_speed,
int forward_max_speed,
int backward_min_speed,
int backward_max_speed)
Method to add a DC Motor |
void |
addServo(int location,
java.lang.String name)
Method to add a RC servo to current LSC |
void |
addServo(int location,
java.lang.String name,
int min_angle,
int max_angle)
Method to add a RC servo to current LSC |
void |
calibrate()
This method check LSC connected with NXTe Currently I am debugging |
LDCMotor |
getDCMotor(int index)
Method to get an LDC Motor |
LServo |
getServo(int index)
Method to get an RC Servo in a LSC |
void |
loadAllServos()
Load all servos connected this this LSC |
void |
unloadAllServos()
Unload all servos connected in a LSC |
| Methods inherited from class lejos.nxt.I2CSensor |
|---|
fetchString, getAddress, getData, getData, getData, getId, getProductID, getVendorID, getVersion, sendData, sendData, sendData, setAddress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LSC(SensorPort port,
byte SPI_PORT)
port - SPI_PORT - | Method Detail |
|---|
public void addServo(int location,
java.lang.String name)
throws java.lang.ArrayIndexOutOfBoundsException
location - the locationname - the name of the servo
java.lang.ArrayIndexOutOfBoundsException
public void addServo(int location,
java.lang.String name,
int min_angle,
int max_angle)
throws java.lang.ArrayIndexOutOfBoundsException
location - the locationname - the name of the servo
java.lang.ArrayIndexOutOfBoundsExceptionpublic LServo getServo(int index)
index - in the array
public void addDCMotor(int location,
java.lang.String name)
throws java.lang.ArrayIndexOutOfBoundsException
location - the locationname - the name of the motor
java.lang.ArrayIndexOutOfBoundsException
public void addDCMotor(int location,
java.lang.String name,
int forward_min_speed,
int forward_max_speed,
int backward_min_speed,
int backward_max_speed)
throws java.lang.ArrayIndexOutOfBoundsException
location - name -
java.lang.ArrayIndexOutOfBoundsExceptionpublic LDCMotor getDCMotor(int index)
index - the index in the array
public void calibrate()
public void loadAllServos()
public void unloadAllServos()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||