Configure your light module
First of all, you need to tell our firmware how to connect with the LED light of your drone. Skybrush Live supports three methods at the moment: LED lights connected directly to the servo outputs of the autopilot, external LED lights controlled by MAVLink
DEBUG_VECT messages, or NeoPixel and ProfiLED strips driven via an RC output channel.
LED lights connected to servo outputs
In this setup, the red, green and blue channels of the LED light must be connected to the servo outputs of the autopilot. The function values associated with the three channels (R, G, B) are 107, 108, 109, respectively. So for example, if the red, green and blue channels are connected to servos 9, 10 and 11, you need to set the following parameters on the drone:
SERVO9_FUNCTION 107 SERVO10_FUNCTION 108 SERVO11_FUNCTION 109 SHOW_LED0_TYPE 6
You might also need to set up the frequency and minimum and maximum PWM ranges of the servo channels appropriately (
SERVOx_TRIM) parameters; typical values are 0 and 10000 for the minimum and the maximum, respectively, if
SERVO_RATE is 100 Hz.
External LED lights controlled by MAVLink messages
This setup assumes that your LED light responds to MAVLink
DEBUG_VECT messages where the name in the message is set to
z components of the message carry the RGB intensity values in the range 0-1. The LED light can be connected directly to one of the telemetry ports of the autopilot, or there may be a routing component between the LED light and the autopilot that takes care of forwarding the appropriate messages to the LED light.
If the LED light is connected to telemetry port 1, use the following parameter setting:
SHOW_LED0_TYPE 1 SHOW_LED0_CHAN 0
If the LED light is connected to telemetry port 2, use the following parameter setting:
SHOW_LED0_TYPE 1 SHOW_LED0_CHAN 1
NeoPixel and ProfiLED strips
This setup assumes that a NeoPixel or ProfiLED strip is connected to one of the RC output ports of the autopilot. Each LED strip may contain multiple LEDs, but all the LEDs will be set to the same color at any moment in time.
If you have NeoPixel LEDs, start with the following parameter setting:
If you have ProfiLED strips, start with the following parameter setting:
Besides setting the LED type, you also need to tell the firmware how many LEDs are there on a single strip, and which RC channel to use. For instance, if the LED strip is on RC channel 6 and you have 16 LEDs:
SHOW_LED0_CHAN 6 SHOW_LED0_COUNT 16