SetLED

Sets the active period and blink rate for the specified LED.

Syntax

public static bool SetLED(
    int LedNo, 
    int ActivePeriod, 
    int BlinkRate
)

Parameters

LedNo
[in] LED number:
12 for LED_VM3_USER_GREEN
13 for LED_VM3_USER_RED

ActivePeriod
Value for the active period. Range is 0 to 7. For more information, see Remarks.

BlinkRate
Value for the blink rate. Range is 0 to 7. For more information, see Remarks.

Return Values

Returns true on success, false otherwise.

Remarks

The next table lists valid values for ActivePeriod and BlinkRate:

Value ActivePeriod (in seconds) BlinkRate (in Hz)
0 Off Off
1 1/4 1/4
2 1/2 1/2
3 1 1
4 2 2
5 4 4
6 8 8
7 Always on Always on

For example, if ActivePeriod = 3 and BlinkRate = 5, the LED blinks for 1 second at a rate of 4 blinks/second.

More Information

LED Control Functions