pt.citar.diablu.nxt.brick
Class NXTColorSensor
java.lang.Object
pt.citar.diablu.nxt.brick.NXTComponent
pt.citar.diablu.nxt.brick.NXTColorSensor
public class NXTColorSensor
- extends NXTComponent
The NXTColorSensor class represents the, hmm, light sensor...
- Author:
- Matt Cotter
Constructor Summary |
NXTColorSensor(NXTBrick brick,
byte portAttached)
Coonstructs a new NXTColorSensor object given the NXTBrick and the port number the
sensor is connected to. |
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
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).
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