LED Functions

Function Name

Description

Zen

Plus

set_led

sets the state of the LED on a controller

✔️

✔️

set_led

set_led sets the state of an LED on the controller. The LEDs range from 0 to 3. Four constants have been created to make it easier to remember which value is assigned to which LED:

Name

Description

Value

LED_1

LED 1 / Xbox 360 Quadrant 1

0

LED_2

LED 2 / Xbox 360 Quadrant 2

1

LED_3

LED 3 / Xbox 360 Quadrant 3

2

LED_4

LED 4 / Xbox 360 Quadrant 4

3

An LED can be set to one of four states using this function which range from 0 to 3, as shown in the table below:

Value

Description

0

LED Off

1

LED On

2

LED Blink Fast

3

LED Blink Slowly

set_led(LED_1, 0); // turn the LED OFF
set_led(LED_1, 1); // turn the LED ON
set_led(LED_1, 2); // make the LED blink fast
set_led(LED_1, 3); // make the LED blink slowly

🔴 Syntax

set_led( <led_identifier>,<led_state>);

Parameters

<led_identifier> : the LED identifier. <led_state> : the state identifier of the controller LED.

🔵 Returns

None