icommand.platform.nxt
Class Light

java.lang.Object
  extended by icommand.platform.nxt.Light

public class Light
extends java.lang.Object


Constructor Summary
Light(Sensor sensor)
          Light Sensor.
 
Method Summary
 void activate()
          Turns on the LED light.
 int getLightPercent()
          Returns light reading as a percentage.
 int getLightValue()
          Normalized value.
 void passivate()
          Turns off the LED light so it can passively read light values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Light

public Light(Sensor sensor)
Light Sensor. LED light is on (active) by default.

Parameters:
sensor -
Method Detail

getLightPercent

public int getLightPercent()
Returns light reading as a percentage.

Returns:
0 to 100 (0 = dark, 100 = bright)

getLightValue

public int getLightValue()
Normalized value.

Returns:
0 to 1023

passivate

public void passivate()
Turns off the LED light so it can passively read light values.


activate

public void activate()
Turns on the LED light.