SunSPOT API V5.0


com.sun.spot.sensorboard.capabilities
Interface ITriColorLEDController

All Known Implementing Classes:
EDemoController

public interface ITriColorLEDController

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

Author:
arshan

Method Summary
 int getBlueLEDValue(PinDescriptor pidx)
          Get the current blue color value for the indicated LED
 int getGreenLEDValue(PinDescriptor pidx)
          Get the current green color value for the indicated LED
 int getRedLEDValue(PinDescriptor pidx)
          Get the current red color value for the indicated LED
 boolean isOnLED(PinDescriptor pidx)
          Return if the LED is on or off.
 void setLEDValue(PinDescriptor pidx, int r, int g, int b)
          Set the RGB value of one of the LEDs being controlled.
 void setOnLED(PinDescriptor pidx, boolean on)
          Turn the LED on or off
 

Method Detail

setLEDValue

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


getRedLEDValue

int getRedLEDValue(PinDescriptor pidx)
Get the current red color value for the indicated LED

Parameters:
pidx - desired LED descriptor
Returns:
current red intensity of the LED

getGreenLEDValue

int getGreenLEDValue(PinDescriptor pidx)
Get the current green color value for the indicated LED

Parameters:
pidx - desired LED descriptor
Returns:
current green intensity of the LED

getBlueLEDValue

int getBlueLEDValue(PinDescriptor pidx)
Get the current blue color value for the indicated LED

Parameters:
pidx - desired LED descriptor
Returns:
current blue intensity of the LED

setOnLED

void setOnLED(PinDescriptor pidx,
              boolean on)
Turn the LED on or off

Parameters:
pidx - desired LED descriptor
on - turn LED on if true

isOnLED

boolean isOnLED(PinDescriptor pidx)
Return if the LED is on or off.

Parameters:
pidx - desired LED descriptor
Returns:
true if the LED is currently on

SunSPOT API V5.0


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