|
|||||||||
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.NXTLineLeader
public class NXTLineLeader
This class manages the sensor NXT Line Leader from Mindsensors. The sensor add a sensor row to detect black/white lines. This sensor is perfect to build a robot which has the mission to follow a line.
Field Summary |
---|
Fields inherited from class lejos.nxt.I2CSensor |
---|
PRODUCT_ID, SENSOR_TYPE, VERSION |
Constructor Summary | |
---|---|
NXTLineLeader(I2CPort port)
Constructor |
Method Summary | |
---|---|
int |
getAverage()
Get the average value |
int |
getKD()
Get KD value |
int |
getKI()
Get KI value |
int |
getKP()
Get KP value |
int |
getResult()
Get result value |
int |
getSensorStatus(int index)
Get status from each sensor in the raw |
int |
getSteering()
Get the steering value |
void |
sendCommand(char cmd)
Send a single byte command represented by a letter |
void |
setKD(int KD)
Set KD value |
void |
setKI(int KI)
Set KI value |
void |
setKP(int KP)
Set KP value |
void |
sleep()
Sleep the sensor |
void |
wakeUp()
Wake up the sensor |
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 NXTLineLeader(I2CPort port)
port
- Method Detail |
---|
public void sendCommand(char cmd)
cmd
- the letter that identifies the commandpublic void sleep()
public void wakeUp()
public int getSteering()
public int getAverage()
public int getResult()
public int getKP()
public void setKP(int KP)
public int getKI()
public void setKI(int KI)
public int getKD()
public void setKD(int KD)
public int getSensorStatus(int index)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |