Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions
com.phidgets.LEDPhidget Class Reference
Inheritance diagram for com.phidgets.LEDPhidget:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

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.

Author:
Phidgets Inc.

Definition at line 22 of file LEDPhidget.java.


Constructor & Destructor Documentation

Definition at line 24 of file LEDPhidget.java.


Member Function Documentation

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.

Parameters:
indexLED
Returns:
brightness
Exceptions:
PhidgetExceptionIf 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.

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

Returns:
Current Limit
Exceptions:
PhidgetExceptionIf 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.

Parameters:
indexLED
Returns:
current limit
Exceptions:
PhidgetExceptionIf 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

Returns the number of LEDs that this board can drive. This may not correspond to the actual number of LEDs attached.

Returns:
number of LEDs
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.

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

Returns:
Voltage
Exceptions:
PhidgetExceptionIf 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.

Parameters:
indexindex of the LED
brightnessdesired brightness of this LED
Exceptions:
PhidgetExceptionIf 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.

Parameters:
currentLimitCurrent Limit
Exceptions:
PhidgetExceptionIf 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.

Parameters:
indexindex of the LED
limitdesired current limit of this LED
Exceptions:
PhidgetExceptionIf 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

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.

Parameters:
voltageVoltage
Exceptions:
PhidgetExceptionIf 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.

Member Data Documentation

20mA current limit. This is used with getCurrentLimit and setCurrentLimit

Definition at line 33 of file LEDPhidget.java.

40mA current limit. This is used with getCurrentLimit and setCurrentLimit

Definition at line 37 of file LEDPhidget.java.

60mA current limit. This is used with getCurrentLimit and setCurrentLimit

Definition at line 41 of file LEDPhidget.java.

80mA current limit. This is used with getCurrentLimit and setCurrentLimit

Definition at line 45 of file LEDPhidget.java.

1.7V Voltage output. This is used with getVoltage and setVoltage

Definition at line 50 of file LEDPhidget.java.

2.75V Voltage output. This is used with getVoltage and setVoltage

Definition at line 54 of file LEDPhidget.java.

3.9V Voltage output. This is used with getVoltage and setVoltage

Definition at line 58 of file LEDPhidget.java.

5.0V Voltage output. This is used with getVoltage and setVoltage

Definition at line 62 of file LEDPhidget.java.


The documentation for this class was generated from the following file:


pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:22