LED1

LED1 N

CREATES A SYSTEM OBJECT LED1 AND ALLOCATES IT NUMBER N AS REFERENCE

  • Type: Command
  • Parameter: 1
  • Group: System Objects Creation

ACTION

The command LED1 N creates a system object LED1, and allocates it a number N. The number N will be used to designate the LED1.

The created LED1 can then be used through the appropriated commands.

The LED1 is created at position (0,0) : that is TOP = 0 pixel and LEFT = 0 pixel, with dimensions WIDTH = 22 pixels and HEIGHT = 22 pixels.

A LED1 is a mean for the user to display a small colored light (Light-Emitting Diode).

A LED1 is green and off by default. Its color can be changed with COLOR. It is switched on with MARK_ON and switched off with MARK_OFF.

A LED1 can generate the event : ON_CLICK.

Remark : by default, the LED1 is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the LED1.

SYNTAX: LED1 N

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • A LED1 is used to display a LED which can be colored with COLOR, switched on with MARK_ON and switched off with MARK_OFF.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than or equal to 0.
  • If number N is already used for a system object number.

EXAMPLE

rem create a LED1 with default position and dimensions

led1 1

wait 1000

mark_on 1

wait 1000

mark_off 1

SEE ALSO

TOP

LEFT

WIDTH

HEIGHT

FULL_SPACE

MARK_ON

MARK_OFF

ON_CLICK