|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.sensorboard.peripheral.TriColorLED
public class TriColorLED
Provides access to the colored LEDs. LED state is now kept by the ITriColorLEDController.
| Constructor Summary | |
|---|---|
TriColorLED(PinDescriptor pidx,
ITriColorLEDController cntrl)
Constructor. |
|
| 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. |
boolean |
isOn()
Return if the LED is on or off. |
void |
setColor(LEDColor rgb)
Set the color of the LED |
void |
setOff()
Turn the LED off. |
void |
setOn()
Turn the LED on, using the currently stored intensity values (initially zero). |
void |
setOn(boolean on)
Turn the LED on or off |
void |
setRGB(int redRGB,
int greenRGB,
int blueRGB)
Set the colour of the LED. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TriColorLED(PinDescriptor pidx,
ITriColorLEDController cntrl)
pidx - the pin connected to this LEDcntrl - the SPI controller for this LED| Method Detail |
|---|
public PinDescriptor getIndex()
getIndex in interface ITriColorLED
public void setRGB(int redRGB,
int greenRGB,
int blueRGB)
setRGB in interface ITriColorLEDredRGB - the intensity of the red portion, in the range 0-255greenRGB - the intensity of the green portion, in the range 0-255blueRGB - the intensity of the blue portion, in the range 0-255public void setColor(LEDColor rgb)
setColor in interface ITriColorLEDrgb - the new colorpublic void setOn()
setOn in interface ILedpublic void setOff()
setOff in interface ILedpublic void setOn(boolean on)
setOn in interface ILedon - turn LED on if truepublic boolean isOn()
isOn in interface ILedpublic int getRed()
getRed in interface ITriColorLEDpublic int getGreen()
getGreen in interface ITriColorLEDpublic int getBlue()
getBlue in interface ITriColorLEDpublic LEDColor getColor()
getColor in interface ITriColorLED
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||