|
SunSPOT API V2.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
| Constructor Summary | |
|---|---|
TriColorLED(PinDescriptor pidx,
ITriColorLEDController cntrl)
|
|
| Method Summary | |
|---|---|
int |
getBlue()
|
LEDColor |
getColor()
get the current color of the LED |
int |
getGreen()
|
int |
getRed()
|
boolean |
isOn()
|
String |
name()
An identifying name for the driver (e.g. |
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 full brightness) |
void |
setOn(boolean on)
Turn the LED on or off |
void |
setRGB(int redRGB,
int greenRGB,
int blueRGB)
Set the colour of the LED. |
void |
setUp()
Activate or reactivate the driver (after a deep sleep or when another driver refused to deep sleep). |
boolean |
tearDown()
Deactivate the driver (usually in preparation for deep sleep). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TriColorLED(PinDescriptor pidx,
ITriColorLEDController cntrl)
| Method Detail |
|---|
public void setRGB(int redRGB,
int greenRGB,
int blueRGB)
ITriColorLED
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)
ITriColorLED
setColor in interface ITriColorLEDpublic void setOn()
setOn in interface ILedpublic void setOff()
setOff in interface ILedpublic void setOn(boolean on)
setOn in interface ILedon - turn on if truepublic boolean isOn()
isOn in interface ILedpublic int getBlue()
getBlue in interface ITriColorLEDpublic int getGreen()
getGreen in interface ITriColorLEDpublic LEDColor getColor()
ITriColorLED
getColor in interface ITriColorLEDpublic int getRed()
getRed in interface ITriColorLEDpublic String name()
IDriver
name in interface IDriverpublic boolean tearDown()
IDriver
tearDown in interface IDriverpublic void setUp()
IDriver
setUp in interface IDriver
|
SunSPOT API V2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||