Public Member Functions | |
native double | getBrightness (int index) throws PhidgetException |
native int | getCurrentLimit () throws PhidgetException |
native double | getCurrentLimit (int index) throws PhidgetException |
native int | getDiscreteLED (int index) throws PhidgetException |
native int | getLEDCount () throws PhidgetException |
native int | getVoltage () throws PhidgetException |
LEDPhidget () throws PhidgetException | |
native void | setBrightness (int index, double brightness) throws PhidgetException |
native void | setCurrentLimit (int currentLimit) throws PhidgetException |
native void | setCurrentLimit (int index, double limit) throws PhidgetException |
native void | setDiscreteLED (int index, int brightness) throws PhidgetException |
native void | setVoltage (int voltage) throws PhidgetException |
Static Public Attributes | |
static final int | PHIDGET_LED_CURRENT_LIMIT_20mA = 1 |
static final int | PHIDGET_LED_CURRENT_LIMIT_40mA = 2 |
static final int | PHIDGET_LED_CURRENT_LIMIT_60mA = 3 |
static final int | PHIDGET_LED_CURRENT_LIMIT_80mA = 4 |
static final int | PHIDGET_LED_VOLTAGE_1_7V = 1 |
static final int | PHIDGET_LED_VOLTAGE_2_75V = 2 |
static final int | PHIDGET_LED_VOLTAGE_3_9V = 3 |
static final int | PHIDGET_LED_VOLTAGE_5_0V = 4 |
Private Member Functions | |
final void | enableDeviceSpecificEvents (boolean b) |
Static Private Member Functions | |
static native long | create () throws PhidgetException |
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.
Definition at line 22 of file LEDPhidget.java.
com.phidgets.LEDPhidget.LEDPhidget | ( | ) | throws PhidgetException [inline] |
Definition at line 24 of file LEDPhidget.java.
static native long com.phidgets.LEDPhidget.create | ( | ) | throws PhidgetException [static, private] |
final void com.phidgets.LEDPhidget.enableDeviceSpecificEvents | ( | boolean | b | ) | [inline, private] |
Reimplemented from com.phidgets.Phidget.
Definition at line 162 of file LEDPhidget.java.
native double com.phidgets.LEDPhidget.getBrightness | ( | int | index | ) | throws PhidgetException |
Returns the brightness value of an LED. This value ranges from 0-100.
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. |
native int com.phidgets.LEDPhidget.getCurrentLimit | ( | ) | throws PhidgetException |
Returns the current limit for the all outputs. This is only supported by some PhidgetLEDs - see the product manual. The possible values for type are PHIDGET_LED_CURRENT_LIMIT_20mA, PHIDGET_LED_CURRENT_LIMIT_40mA, PHIDGET_LED_CURRENT_LIMIT_60mA and PHIDGET_LED_CURRENT_LIMIT_80mA
PhidgetException | If this Phidget is not opened and attached, if the index is out of range, or if unsupported by this board. See open for information on determining if a device is attached. |
native double com.phidgets.LEDPhidget.getCurrentLimit | ( | int | index | ) | throws PhidgetException |
Returns the current limit value of an LED. This value ranges from 0-80 mA.
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. |
native int com.phidgets.LEDPhidget.getDiscreteLED | ( | int | index | ) | throws PhidgetException |
Deprecated. Use getBrightness
native int com.phidgets.LEDPhidget.getLEDCount | ( | ) | throws PhidgetException |
Returns the number of LEDs that this board can drive. This may not correspond to the actual number of LEDs attached.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.LEDPhidget.getVoltage | ( | ) | throws PhidgetException |
Returns the voltage output for the all outputs. This is only supported by some PhidgetLEDs - see the product manual. The possible values for type are PHIDGET_LED_VOLTAGE_1_7V, PHIDGET_LED_VOLTAGE_2_75V, PHIDGET_LED_VOLTAGE_3_9V and PHIDGET_LED_VOLTAGE_5_0V
PhidgetException | If this Phidget is not opened and attached, if the index is out of range, or if unsupported by this board. See open for information on determining if a device is attached. |
native void com.phidgets.LEDPhidget.setBrightness | ( | int | index, |
double | brightness | ||
) | throws PhidgetException |
Sets the brightness of an LED. Valid values are 0-100, with 0 being off and 100 being the brightest.
index | index of the LED |
brightness | desired brightness of this LED |
PhidgetException | If this Phidget is not opened and attached, or if the index or brightness value are out of range. See open for information on determining if a device is attached. |
native void com.phidgets.LEDPhidget.setCurrentLimit | ( | int | currentLimit | ) | throws PhidgetException |
Sets the current limit for all outputs. This is only supported by some PhidgetLEDs - see the product manual.
The possible values for type are PHIDGET_LED_CURRENT_LIMIT_20mA, PHIDGET_LED_CURRENT_LIMIT_40mA, PHIDGET_LED_CURRENT_LIMIT_60mA and PHIDGET_LED_CURRENT_LIMIT_80mA
By default, currentLimit is set to PHIDGET_LED_CURRENT_LIMIT_20mA.
currentLimit | Current Limit |
PhidgetException | If this Phidget is not opened and attached, if the index is out of range, or if unsupported by this board. See open for information on determining if a device is attached. |
native void com.phidgets.LEDPhidget.setCurrentLimit | ( | int | index, |
double | limit | ||
) | throws PhidgetException |
Sets the current limit of an LED. Valid values are 0-80 mA.
index | index of the LED |
limit | desired current limit of this LED |
PhidgetException | If this Phidget is not opened and attached, or if the index or limit value are out of range. See open for information on determining if a device is attached. |
native void com.phidgets.LEDPhidget.setDiscreteLED | ( | int | index, |
int | brightness | ||
) | throws PhidgetException |
Deprecated. Use setBrightness
native void com.phidgets.LEDPhidget.setVoltage | ( | int | voltage | ) | throws PhidgetException |
Sets the voltage output for all outputs. This is only supported by some PhidgetLEDs - see the product manual.
The possible values for type are PHIDGET_LED_VOLTAGE_1_7V, PHIDGET_LED_VOLTAGE_2_75V, PHIDGET_LED_VOLTAGE_3_9V and PHIDGET_LED_VOLTAGE_5_0V
By default, voltage is set to PHIDGET_LED_VOLTAGE_2_75V.
voltage | Voltage |
PhidgetException | If this Phidget is not opened and attached, if the index is out of range, or if unsupported by this board. See open for information on determining if a device is attached. |
final int com.phidgets.LEDPhidget.PHIDGET_LED_CURRENT_LIMIT_20mA = 1 [static] |
20mA current limit. This is used with getCurrentLimit and setCurrentLimit
Definition at line 33 of file LEDPhidget.java.
final int com.phidgets.LEDPhidget.PHIDGET_LED_CURRENT_LIMIT_40mA = 2 [static] |
40mA current limit. This is used with getCurrentLimit and setCurrentLimit
Definition at line 37 of file LEDPhidget.java.
final int com.phidgets.LEDPhidget.PHIDGET_LED_CURRENT_LIMIT_60mA = 3 [static] |
60mA current limit. This is used with getCurrentLimit and setCurrentLimit
Definition at line 41 of file LEDPhidget.java.
final int com.phidgets.LEDPhidget.PHIDGET_LED_CURRENT_LIMIT_80mA = 4 [static] |
80mA current limit. This is used with getCurrentLimit and setCurrentLimit
Definition at line 45 of file LEDPhidget.java.
final int com.phidgets.LEDPhidget.PHIDGET_LED_VOLTAGE_1_7V = 1 [static] |
1.7V Voltage output. This is used with getVoltage and setVoltage
Definition at line 50 of file LEDPhidget.java.
final int com.phidgets.LEDPhidget.PHIDGET_LED_VOLTAGE_2_75V = 2 [static] |
2.75V Voltage output. This is used with getVoltage and setVoltage
Definition at line 54 of file LEDPhidget.java.
final int com.phidgets.LEDPhidget.PHIDGET_LED_VOLTAGE_3_9V = 3 [static] |
3.9V Voltage output. This is used with getVoltage and setVoltage
Definition at line 58 of file LEDPhidget.java.
final int com.phidgets.LEDPhidget.PHIDGET_LED_VOLTAGE_5_0V = 4 [static] |
5.0V Voltage output. This is used with getVoltage and setVoltage
Definition at line 62 of file LEDPhidget.java.