LEDColour() - The Indicator LED Color Control Command
This command changes the color of indicators on a button station. The command modifies one button at a time while leaving others alone.
This is similar to the LEDOnOff() command but can only do one at a time and is multicolor.
Syntax
LEDColour(Button Number, Red Value, Green Value, Blue Value)
This command is independent of the LEDOnOff() command. It only changes the color. If the indicator is "off" the brightness of the color will be the inactive level set in SB. You may have to use the two in conjunction to actually see the output from the keypad.
Button Number has an index of 0. That means that button 4 has a value of 3 in the command. |
Examples
Example 1
{
Name=”Turn On Button 1”
LEDColour(0,255 ,0,0) //Turns button 1 Red
LEDColour(1,0,255,0) //Turns button 2 Green
LEDColour(5,255,255,255) //Turns button 6 White
}
Example 2
This task uses constants to easily load color values.
#const LEDWhite 255,255,255
#const LEDOff 0,0,0
#const LEDRed 255,0,0
#const LEDOrange 255,165,0
#const LEDGreen 0,255,0
#const LEDTeal 0,128,128
#const LEDBlue 0,0,255
#const LEDMagenta 255,0,255
{
Name=”2 Button Rainbow”
Delay=.5 //Set the delay time
Loop:
LEDColour(0,LEDRed) //Button 1 Red
LEDColour(1,LEDRed) //Button 2 Red
Delay()
LEDColour(0,LEDOrange) //Button 1 Orange
LEDColour(1,LEDOrange) //Button 2 Orange
Delay()
LEDColour(0,LEDGreen) //Button 1 Green
LEDColour(1,LEDGreen) //Button 2 Green
Delay()
LEDColour(0,LEDTeal) //Button 1 Teal
LEDColour(1,LEDTeal) //Button 2 Teal
Delay()
LEDColour(0,LEDBlue) //Button 1 Blue
LEDColour(1,LEDBlue) //Button 2 Blue
Delay()
LEDColour(0,LEDMagenta) //Button 1 Magenta
LEDColour(1,LEDMagenta) //Button 2 Magenta
Delay()
BRA Loop
}
Example 3
Flashes LEDs 1 and 5 to indicate a panic is active.
{
Name=”Alert Blink”
Delay=.1 //Set the delay time
LedOnOff(0x87,0x87,0x00,0x00) //Turn On [ 1 5 ] And Turn Off [ 2 3 4 6 7 8 ]
Loop:
LEDColour(0,255,0,0) //Button 1 Red
LEDColour(4,0,0,255) //Button 5 Blue
Delay()
LEDColour(0,0,0,255) //Button 1 Blue
LEDColour(4,255,0,0) //Button 5 Red
Delay()
BRA Loop
}