led

Display on/off status in color

Description

Available in four fantastic fruit flavors and monochrome. Select an led and use the object's Inspector to set the color and blink time.

Arguments

None.

Messages

bang Flashes led on and off quickly, and outputs 0.

Clicking on an led toggles it back and forth between bright and dark, outputting 1 and 0.
int on/off-flag (0 or non-zero) [int]
If the number is 0, led shows its darkened state, and outputs 0. If the number is not 0, led shows its brightened state and outputs 1.
float on/off-flag (0 or non-zero) [float]
Converted to int.
(mouse) Clicking on an led object toggles it back and forth between bright and dark, outputting 1 and 0.
pict color (0 through 4) [int]
In left inlet: the word pict, followed by an integer from 0 to 4, changes the color used by led.
set on/off-flag (0 or non-zero) [int]
The word set, followed by a non-zero number causes led to show its brightened state, but causes no output; set 0 shows the led object in a darkened state, but causes no output.
toggle Switches the led from dark to bright and sends 1 out the outlet; or vice-versa, from bright to dark, sending 0 out the outlet.

Attributes

Name Type g/s Description
bgcolor float Sets the background color of the led object in RGBA format.
blinktime int
def.:150
Specifies the duration (in milliseconds) that the led object will flash when it is clicked upon or receives a bang message.
offcolor float Sets the inactive (off) color of the LED in RGBA format.
oncolor float Sets the active (on) color of the LED in RGBA format.

Information for box attributes common to all objects

Menu Items

Name Description
Color Choosing the Color... menu item from the Object menu when the object is selected opens a color picker, permitting adjustment to the appearance of the led object.

Output

int: The output is 1 when led is bright, 0 when it is dark. A bang in the inlet flashes led on and off and sends 0 out the outlet.

Examples

Displays an on/off state announces activity with a flash or can be used as a toggle

See Also

Name Description
button Flash on any message, send a bang
pictctrl Picture-based control
togedge Report zero/non-zero transitions
toggle Switch between off and on (0 and 1)