|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.resources.Resource
com.sun.spot.resources.CompositeResource
com.sun.spot.resources.transducers.CompositeTransducer
com.sun.spot.sensorboard.peripheral.TriColorLEDArray
public class TriColorLEDArray
Access and control of an array of 3 color LEDs
| Field Summary |
|---|
| Fields inherited from class com.sun.spot.resources.CompositeResource |
|---|
resources |
| Constructor Summary | |
|---|---|
TriColorLEDArray()
|
|
| Method Summary | |
|---|---|
void |
add(ITransducer t)
|
ITriColorLED |
getLED(int i)
Return the Nth LED in the array |
void |
setColor(LEDColor clr)
Set the color of the LEDs. |
void |
setOff()
Turn all the LEDs off |
void |
setOn()
Turn all the LEDs on |
void |
setOn(boolean on)
Set all the LED's state |
void |
setOn(int bits)
Set each LED's state based on the bits flag. |
void |
setRGB(int redRGB,
int greenRGB,
int blueRGB)
Set the colour of all the LEDs in the array. |
int |
size()
Return the number of LEDs in the array |
ITriColorLED[] |
toArray()
Return all the LEDs in an array |
| Methods inherited from class com.sun.spot.resources.transducers.CompositeTransducer |
|---|
remove |
| Methods inherited from class com.sun.spot.resources.CompositeResource |
|---|
add, internalAt, internalSize, lookup, lookup, lookup, lookup, lookup, lookupAll, lookupAll, lookupAll, lookupAll, lookupAll, remove |
| Methods inherited from class com.sun.spot.resources.Resource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.spot.resources.transducers.ICompositeTransducer |
|---|
remove |
| Methods inherited from interface com.sun.spot.resources.ICompositeResource |
|---|
add, lookup, lookup, lookup, lookup, lookup, lookupAll, lookupAll, lookupAll, lookupAll, lookupAll, remove |
| Methods inherited from interface com.sun.spot.resources.IResource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Constructor Detail |
|---|
public TriColorLEDArray()
| Method Detail |
|---|
public int size()
size in interface ITriColorLEDArraypublic ITriColorLED getLED(int i)
getLED in interface ITriColorLEDArrayi - the index of the LED to return
public ITriColorLED[] toArray()
toArray in interface ITriColorLEDArraypublic void setOn()
setOn in interface ITriColorLEDArraypublic void setOff()
setOff in interface ITriColorLEDArraypublic void setOn(boolean on)
setOn in interface ITriColorLEDArrayon - true to set all the LEDs on, false to set them off.public void setOn(int bits)
setOn in interface ITriColorLEDArraybits - set LED N on if (bits & 1 << N) != 0
public void setRGB(int redRGB,
int greenRGB,
int blueRGB)
setRGB in interface ITriColorLEDArrayredRGB - 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 clr)
setColor in interface ITriColorLEDArrayclr - the new colorpublic void add(ITransducer t)
add in interface ICompositeTransduceradd in class CompositeTransducer
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||