4. Controlling the LED

libfreenect makes controlling the LED on the Kinect very simple, a function called freenect_set_led was created which allows you to specify the device and the LED option.

int freenect_set_led( freenect_device * dev, freenect_led_options option )

Set the state of the LED. Uses blocking control message call to update device.

Inputs:

dev – The Kinect on which the LED is
option – LED state to set. (See freenect_led_options enum.)

Returns:

0 – Success
< 0 - Fail

freenect_led_options:

LED_GREEN
LED_RED
LED_YELLOW
LED_BLINK_GREEN
LED_BLINK_YELLOW
LED_BLINK_RED_YELLOW
LED_OFF

Example Use:

freenect_device *f_dev;

freenect_set_led( f_dev, LED_BLINK_RED_YELLOW );

More information available – here