icommand.nxt
Class LightSensor

java.lang.Object
  extended by icommand.nxt.LightSensor

public class LightSensor
extends java.lang.Object


Constructor Summary
LightSensor(SensorPort sensor)
          LightSensor Port.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LightSensor

public LightSensor(SensorPort sensor)
LightSensor Port. 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.



Copyright © 2006. All Rights Reserved.