(22) LED lights (external)

Article Directory

foreword

22.1 RGB LEDs/display with I2C connection

22.2 Serially connected devices

22.3 Meaning of NTF LED


foreword

An external LED or LED display can be added by connecting to the I2C port of the autopilot , or in 4.0 and later, if it is a serially programmed device, it can be added through the output using SERVOx_FUNCTION for this output. DroneCAN LED on CANBUS is also supported (see  DroneCAN Setup ).


Note

Note that the grouping limitations that apply to setting outputs to different PWM rates and/or DShot also apply to LEDs , since the timers associated with each group of outputs cannot be used for different rates. See Mixing ESC Protocols .

22.1 RGB LEDs/display with I2C connection

Two types of I2C devices are supported: I2C- connected RGB LEDs and OLED displays using LED driver chips .

Supported RGB LEDs /drivers are:

  • Toshiba LEDs (no longer in production)
  • PCA9685 driver
  • NCP5623 driver

Supported OLED displays are SSH1106 and SSD1306 , 128x64 pixel displays. See Onboard Display for more information .

Since most users use an external GPS and Compass module , it is recommended to use an I2C shunt as shown below. The NTF_LED_TYPES  parameter should be set to the type of controller being used. 

22.2 Serially connected devices

Currently, ArduPilot supports Neopixel and ProfiLED RGB LED strings. They can be used like other RGB LEDs for NTF notifications of autopilot status and warnings , or infinitely programmable using LUA scripts on the autopilot SD card. To use the script, the output function must be set to the script output function ( 94-109 ), and then the script will assign this output to the LED . For more examples of using LUA scripts, see Lua Scripts ( Lua Scripts ).

Serial LEDs require a full PWM set, more information on your autopilot 's PWM set can be found on its hardware page . To check that the desired output is set correctly, look for the PWM type information in the info tab of the GCS . See  GPIOs .

Note

Please make sure the output is configured as a normal PWM and not a GPIO output. Flight controllers with an IOMCU can only use the AUX output to interface the serial LEDs . To check that the desired output is set correctly, look for the PWM type information in the info tab of the GCS . See  GPIOs .

22.3 Meaning of NTF LED

If the standard default protocol is set to  NTF_LED_OVERRIDE , the meaning of the colors and blinking patterns is shown in LEDs Meaning ( LEDs Meaning ).

The brightness and number of LEDs can  be controlled by modifying  NTF_LED_BRIGHT  and  NTF_LED_LEN .

Guess you like

Origin blog.csdn.net/qq_20016593/article/details/131589882