|
|||||||||
| 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 interface lejos.nxt.SensorConstants |
|---|
MODE_ANGLESTEP, MODE_BOOLEAN, MODE_CELSIUS, MODE_FARENHEIT, MODE_PCTFULLSCALE, MODE_PERIODCOUNTER, MODE_RAW, MODE_TRANSITIONCNT, TYPE_ANGLE, TYPE_CUSTOM, 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 |
| Constructor Summary | |
|---|---|
LSC(SensorPort port,
byte SPI_PORT)
Constructor |
|
| Method Summary | |
|---|---|
void |
addDCMotor(int location,
String name)
Method to add a DC Motor |
void |
addDCMotor(int location,
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,
String name)
Method to add a RC servo to current LSC |
void |
addServo(int location,
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, getData, getPort, getProductID, getSensorType, getVersion, 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,
String name)
throws ArrayIndexOutOfBoundsException
location - the locationname - the name of the servo
ArrayIndexOutOfBoundsException
public void addServo(int location,
String name,
int min_angle,
int max_angle)
throws ArrayIndexOutOfBoundsException
location - the locationname - the name of the servo
ArrayIndexOutOfBoundsExceptionpublic LServo getServo(int index)
index - in the array
public void addDCMotor(int location,
String name)
throws ArrayIndexOutOfBoundsException
location - the locationname - the name of the motor
ArrayIndexOutOfBoundsException
public void addDCMotor(int location,
String name,
int forward_min_speed,
int forward_max_speed,
int backward_min_speed,
int backward_max_speed)
throws ArrayIndexOutOfBoundsException
location - name -
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 | ||||||||