SunSPOT API V5.0


com.sun.spot.sensorboard.peripheral
Interface ITriColorLED

All Superinterfaces:
ILed
All Known Implementing Classes:
TriColorLED

public interface ITriColorLED
extends ILed

Access and control of 3 color LEDs


Method Summary
 int getBlue()
          Return the current blue setting.
 LEDColor getColor()
          Get the current color of the LED.
 int getGreen()
          Return the current green setting.
 PinDescriptor getIndex()
          Return the PinDescriptor associated with this LED.
 int getRed()
          Return the current red setting.
 void setColor(LEDColor clr)
          Set the color of the LED.
 void setRGB(int redRGB, int greenRGB, int blueRGB)
          Set the colour of the LED.
 
Methods inherited from interface com.sun.spot.peripheral.ILed
isOn, setOff, setOn, setOn
 

Method Detail

setRGB

void setRGB(int redRGB,
            int greenRGB,
            int blueRGB)
Set the colour of the LED. The colour will only change if the LED is on, but the values supplied are stored.

Parameters:
redRGB - the intensity of the red portion, in the range 0-255
greenRGB - the intensity of the green portion, in the range 0-255
blueRGB - the intensity of the blue portion, in the range 0-255

setColor

void setColor(LEDColor clr)
Set the color of the LED.

Parameters:
clr - the new color

getColor

LEDColor getColor()
Get the current color of the LED.

Returns:
the current color

getRed

int getRed()
Return the current red setting.

Returns:
the current red setting

getGreen

int getGreen()
Return the current green setting.

Returns:
the current green setting

getBlue

int getBlue()
Return the current blue setting.

Returns:
the current blue setting

getIndex

PinDescriptor getIndex()
Return the PinDescriptor associated with this LED.

Returns:
the PinDescriptor associated with this LED.

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.