Sun SPOT API
Green Release  


com.sun.spot.sensorboard.capabilities
Interface ITriColorLEDController

All Known Subinterfaces:
IDemoBoard
All Known Implementing Classes:
EDemoBoard

public interface ITriColorLEDController

Interface for objects that provide access and control to 3 Color LEDs

Author:
arshan

Field Summary
static int BLUE
          internal encoding for blue segment
static int GREEN
          internal encoding for green segment
static int RED
          internal encoding for red segment
 
Method Summary
 ITriColorLED bindLED(PinDescriptor pidx)
          Bind an LED to the pin and return the accessor object
 void setLEDColorIntensity(PinDescriptor pidx, int clr, int val)
          Set the value of only one of the color components.
 void setLEDValue(PinDescriptor pidx, int r, int g, int b)
          set the value of one of the LEDs being controlled
 

Field Detail

RED

static final int RED
internal encoding for red segment

See Also:
Constant Field Values

GREEN

static final int GREEN
internal encoding for green segment

See Also:
Constant Field Values

BLUE

static final int BLUE
internal encoding for blue segment

See Also:
Constant Field Values
Method Detail

bindLED

ITriColorLED bindLED(PinDescriptor pidx)
Bind an LED to the pin and return the accessor object

Parameters:
pidx - desired LED descriptor
Returns:
accessor object to the LED

setLEDValue

void setLEDValue(PinDescriptor pidx,
                 int r,
                 int g,
                 int b)
set the value of one of the LEDs being controlled


setLEDColorIntensity

void setLEDColorIntensity(PinDescriptor pidx,
                          int clr,
                          int val)
Set the value of only one of the color components. The encoding of the clr argument are

RED
GREEN
BLUE

Parameters:
pidx - pin that LED is attached to
clr - color segment to be changed
val - value to set segment to

Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.