|
|||||||||
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.LMotor lejos.nxt.addon.LServo
public class LServo
LServo, Lattebox Servo, is a abstraction to model any RC Servo (continous and non continous) plugged to LSC, Lattebox Servo Controller.
Field Summary |
---|
Fields inherited from class lejos.nxt.addon.LMotor |
---|
arrMotorLoad, arrMotorUnload, LSC_position, SPI_PORT |
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 | |
---|---|
LServo(SensorPort port,
int location,
String servoName,
byte SPI_PORT)
Constructor |
|
LServo(SensorPort port,
int location,
String servoName,
byte SPI_PORT,
int min_angle,
int max_angle)
Constructor with the feature to set min and max angle |
|
LServo(SensorPort port,
int location,
String servoName,
byte SPI_PORT,
int min_angle,
int max_angle,
int init_angle)
Constructor with the feature to set min, max and init angle |
Method Summary | |
---|---|
void |
backward()
Classic backward method for continous RC Servos |
void |
forward()
Classic forward method for continous RC Servos |
int |
getAngle()
Method to know the angle |
void |
goToInitAngle()
Method to set medium angle |
void |
goToMaxAngle()
Method to set maximum angle |
void |
goToMiddleAngle()
Method to set medium angle |
void |
goToMinAngle()
Method to set minimal angle |
void |
setAngle(int angle)
Method to set an Angle in a RC Servo. |
void |
setMaxAngle(int maxAngle)
Set Maximum angle. |
void |
setMinAngle(int minAngle)
Set Minimal angle. |
Methods inherited from class lejos.nxt.addon.LMotor |
---|
getName, getPulse, isMoving, load, setDelay, setPulse, unload |
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 LServo(SensorPort port, int location, String servoName, byte SPI_PORT)
port
- location
- servoName
- SPI_PORT
- public LServo(SensorPort port, int location, String servoName, byte SPI_PORT, int min_angle, int max_angle)
port
- location
- servoName
- SPI_PORT
- min_angle
- max_angle
- public LServo(SensorPort port, int location, String servoName, byte SPI_PORT, int min_angle, int max_angle, int init_angle)
port
- location
- servoName
- SPI_PORT
- min_angle
- max_angle
- init_angle
- Method Detail |
---|
public void setAngle(int angle)
angle
- public int getAngle()
public void setMinAngle(int minAngle)
minAngle
- the minimum anglepublic void setMaxAngle(int maxAngle)
maxAngle
- public void goToMinAngle()
public void goToMaxAngle()
public void goToMiddleAngle()
public void goToInitAngle()
public void forward()
public void backward()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |