pt.citar.diablu.nxt.brick
Class NXTLightSensor

java.lang.Object
  extended by pt.citar.diablu.nxt.brick.NXTComponent
      extended by pt.citar.diablu.nxt.brick.NXTLightSensor

public class NXTLightSensor
extends NXTComponent

The NXTLightSensor class represents the, hmm, light sensor...

Author:
Jorge Cardoso

Field Summary
static byte ACTIVE
           
static byte INACTIVE
           
 
Constructor Summary
NXTLightSensor(NXTBrick brick, byte portAttached)
          Coonstructs a new NXTLightSensor object given the NXTBrick and the port number the sensor is connected to.
 
Method Summary
 int getValue()
           
 void initialize()
           
 void setType(int type)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTIVE

public static final byte ACTIVE
See Also:
Constant Field Values

INACTIVE

public static final byte INACTIVE
See Also:
Constant Field Values
Constructor Detail

NXTLightSensor

public NXTLightSensor(NXTBrick brick,
                      byte portAttached)
Coonstructs a new NXTLightSensor object given the NXTBrick and the port number the sensor is connected to.

Parameters:
brick - The NXTBrick.
portAttached - The port to which the sensor is attached. (0 - 3).
Method Detail

initialize

public void initialize()

getValue

public int getValue()

setType

public void setType(int type)
             throws IllegalArgumentException
Throws:
IllegalArgumentException


Processing library NXTComm by Jorge C. S. Cardoso. (c) 2014