public class HTColorSensor extends Sensor
Constructor and Description |
---|
HTColorSensor()
Creates a sensor instance connected to port S1.
|
HTColorSensor(SensorPort port)
Creates a sensor instance connected to the given port.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor()
Returns a java.awt.Color reference to the color reading.
|
int |
getColorID()
Returns the color ID (0..17).
|
int |
getColorInt()
Returns the color as integer value of the color reading.
|
lejos.hardware.sensor.HiTechnicColorSensor |
getLejosSensor()
Returns the reference of the the underlying
lejos.hardware.sensor.HiTechnicColorSensor.
|
getLejosPort
public HTColorSensor(SensorPort port)
port
- the port where the sensor is plugged-inpublic HTColorSensor()
public lejos.hardware.sensor.HiTechnicColorSensor getLejosSensor()
public java.awt.Color getColor()
public int getColorInt()
public int getColorID()