public class LightSensor extends Input
| Constructor and Description |
|---|
LightSensor(ControlLabInterface controllab,
InputPortEnum port)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getInitialLight()
Return the initial light.
|
int |
getLight()
Get the light.
|
SensorTypeEnum |
getSensorType()
Return the type of sensor.
|
int |
getTolerance()
Return the tolerance.
|
boolean |
hasLessLight() |
boolean |
hasLessLight(int aValue) |
boolean |
hasMoreLight() |
boolean |
hasMoreLight(int aValue) |
void |
reset()
Reset the initial light.
|
void |
setInitialLight(int initialLight)
Set the initial light.
|
void |
setTolerance(int tolerance)
Set the tolerance.
|
addSensorListener, getPort, getSensorListeners, getStatus, getValue, removeSensorListener, setStatus, setValuegetControlLab, setControlLabpublic LightSensor(ControlLabInterface controllab, InputPortEnum port)
controllab - control labport - input portpublic SensorTypeEnum getSensorType()
getSensorType in class Inputpublic int getLight()
public void reset()
public boolean hasMoreLight()
public boolean hasMoreLight(int aValue)
public boolean hasLessLight()
public boolean hasLessLight(int aValue)
public int getInitialLight()
public void setInitialLight(int initialLight)
initialLight - the initial lightpublic int getTolerance()
public void setTolerance(int tolerance)
tolerance - the toleranceCopyright © 2018. All rights reserved.