public class NxtSensor extends Object
Each operation sent to sensors performed by NxtApplication thru NxtCommand
NxtCommand,
NxtApplication| Constructor and Description |
|---|
NxtSensor() |
| Modifier and Type | Method and Description |
|---|---|
int |
getDistance()
Get current distance read from the proximity sensor
|
int |
readColorId()
Read color ID from sensor
|
int[] |
readColorRgb(int numberOfSamples)
Read color from sensor
|
public int[] readColorRgb(int numberOfSamples)
numberOfSamples - Number of reading to performpublic int readColorId()
lejos.nxt.ColorSensor#getColorID(),
lejos.robotics.Colorpublic int getDistance()