public class LSC extends I2CSensor
address, DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_VENDOR_ID, REG_VERSION, retryCountcurrentMode, modesBLACK, BLANK_INDEX, BLUE, BLUE_INDEX, BROWN, GREEN, GREEN_INDEX, MAX_TYPE, MIN_TYPE, MODE_RAW, NXT_ADC_RES, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HIGHSPEED, TYPE_HIGHSPEED_9V, 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 and Description |
|---|
LSC(I2CPort port,
byte SPI_PORT)
Constructor
|
LSC(Port port,
byte SPI_PORT)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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
|
fetchString, getAddress, getData, getData, getPort, getProductID, getRetryCount, getVendorID, getVersion, sendData, sendData, sendData, setAddress, setRetryCountfetchSample, getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, getName, sampleSize, setCurrentMode, setCurrentMode, setModesclose, releaseOnClosepublic LSC(I2CPort port, byte SPI_PORT)
port - SPI_PORT - public LSC(Port port, byte SPI_PORT)
port - SPI_PORT - public void addServo(int location,
java.lang.String name)
throws java.lang.ArrayIndexOutOfBoundsException
location - the locationname - the name of the servojava.lang.ArrayIndexOutOfBoundsExceptionpublic 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 servojava.lang.ArrayIndexOutOfBoundsExceptionpublic LServo getServo(int index)
index - in the arraypublic void addDCMotor(int location,
java.lang.String name)
throws java.lang.ArrayIndexOutOfBoundsException
location - the locationname - the name of the motorjava.lang.ArrayIndexOutOfBoundsExceptionpublic 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 arraypublic void calibrate()
public void loadAllServos()
public void unloadAllServos()