|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.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 |
---|
PRODUCT_ID, SENSOR_TYPE, VERSION |
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
ArrayIndexOutOfBoundsException
public 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
-
ArrayIndexOutOfBoundsException
public 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 |