pt.citar.diablu.nxt.brick
Class NXTColorSensor

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

public class NXTColorSensor
extends NXTComponent

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

Author:
Matt Cotter

Field Summary
static byte BLUE
           
static byte FULL
           
static byte GREEN
           
static byte NONE
           
static byte RED
           
 
Constructor Summary
NXTColorSensor(NXTBrick brick, byte portAttached)
          Coonstructs a new NXTColorSensor 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

FULL

public static final byte FULL
See Also:
Constant Field Values

RED

public static final byte RED
See Also:
Constant Field Values

GREEN

public static final byte GREEN
See Also:
Constant Field Values

BLUE

public static final byte BLUE
See Also:
Constant Field Values

NONE

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

NXTColorSensor

public NXTColorSensor(NXTBrick brick,
                      byte portAttached)
Coonstructs a new NXTColorSensor 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