|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.phidgets.Phidget
com.phidgets.LEDPhidget
public final class LEDPhidget
This class represents a Phidget LED. All methods to control a Phidget LED are implemented in this class.
The Phidget LED is a board that is meant for driving LEDs. Currently, the only available version drives 64 LEDs, but other versions may become available so this number is not absolute.
LEDs can be controlled individually, at brightness levels from 0-100.
Constructor Summary | |
---|---|
LEDPhidget()
|
Method Summary | |
---|---|
int |
getDiscreteLED(int index)
Returns the brightness value of an LED. |
int |
getLEDCount()
Returns the number of LEDs that this board can drive. |
void |
setDiscreteLED(int index,
int brightness)
Sets the brightness of an LED. |
Methods inherited from class com.phidgets.Phidget |
---|
addAttachListener, addDetachListener, addErrorListener, close, equals, getDeviceName, getDeviceType, getDeviceVersion, getLibraryVersion, getSerialNumber, getTag, isAttached, open, openAny, removeAttachListener, removeDetachListener, removeErrorListener, setTag, toString, waitForAttachment |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LEDPhidget() throws PhidgetException
PhidgetException
Method Detail |
---|
public int getLEDCount() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public int getDiscreteLED(int index) throws PhidgetException
index
- LED
PhidgetException
- If this Phidget is not opened and attached, or if the index is out of range.
See open
for information on determining if a device is attached.public void setDiscreteLED(int index, int brightness) throws PhidgetException
index
- index of the LEDbrightness
- desired brightness of this LED
PhidgetException
- If this Phidget is not opened and attached, or if the index of brightness value are out of range.
See open
for information on determining if a device is attached.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |