VMB LED Device Specification

LED Device Specification

The LED device offers just one byte of memory. Each bit of the byte corresponding to one of 8 LEDs: LED7 through LED0. LED0 corresponds to the least significant bit (0x01) and LED7 corresponds to the most significant bit (0x80).

Seting a bit to 1 turns the LED on, setting a bit to 0 turns the LED off.

The color of any LED can beconfigured to be any 3 Byte RGB value (0xFF0000 is red, 0x00FF00 is green, and 0x0000FF is blue). Further, for each LED a picture can be specified to customize the apperance. The picture must be a 32x32 pixel 32 bit color RGB bitmap file . It is used as an alpha channel: each color value of each pixel in the LED is multiplied by the corresponding value of the picture bitmap. The multiplication is scalled such that 255 is equivalent to the factor 1 and 0 to the factor 0. This has the effect that a black and white picture will mask the LED, keeping it black where the picture is black and showing the normal color where the picture is white. On the other extreme, when the LEDs color is set to "white", the LED will display the given picture (with all its colors) when its on, and a much darker version of the colored picture, when it is off. Specifying no picture is equivalent to specifying an all white picture.

A label can be specified to be placed under the LED display and the LEDs can be displayed ieither n a horizontal row, as shown above, or in a vertical column. The number of LEDs displayed can be set to any value n between 1 and 8, showing from left to right LED(n-1) to LED0.

LED Configuration

The LED has the following configurable parameters:

host | localhost | the host where the bus is located
port | 9002 | the port where the bus is located
address | default | address where the resource is located
x | 0 | the x position of the window
y | 0 | the y position of the window
color0 | 0x0000FF = RED | the color of LED0
color1 | 0x00FF00 = GREEN | the color of LED1
color2 | 0xFF0000 = BLUE | the color of LED2
color3 | 0x00FFFF = YELLOW | the color of LED3
color4 | 0xFF00FF = CYAN | the color of LED4
color5 | 0xFFFF00 = MAGENTA | the color of LED5
color6 | 0x8080FF = LIGHT RED | the color of LED6
color7 | 0xFF8080 = LIGHT BLUE | the color of LED7
picture0 | none | the picture for LED 0
picture1 | none | the picture for LED 1
picture2 | none | the picture for LED 2
picture3 | none | the picture for LED 3
picture4 | none | the picture for LED 4
picture5 | none | the picture for LED 5
picture6 | none | the picture for LED 6
picture7 | none | the picture for LED 7
vertical | false | display the LEDs as a vertical column
label | none | Label to display under the LEDs
LEDs | 8 | the number of LEDs to display
minimized | false | start with a minimized window
debug | false | to generate debug output
debugmask | 0xFFF0 | set mask to hide debug output
verbose | false | make debugging verbose, sets debug mask to zero
define | not set | to define a name for conditionals
config | not set | filename for a configuration file
help | false | to print information
These can be set in default.vmb