nusrobomaster / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

LED Support for Dev A and Dev C #3

Open chengguizi opened 3 years ago

chengguizi commented 3 years ago

We would like Dev A board to have Nuttx Status LED enabled (CONFIG_ARCH_LEDS)

Dev A only has a RGB led, so we should use it for status only, not for user.

For Nuttx internal, the control API is

which are enabled by CONFIG_ARCH_LEDS, depending on CONFIG_ARCH_HAVE_LEDS

That is to say, if we want to disable autoled function, controlled by Nuttx, we should turn off CONFIG_ARCH_LEDS. This should be the setting for Dev C, as the number of leds are limited.

Proposed work:

chengguizi commented 3 years ago

PX4 supports status indication through a RGB LED hardware. I believe it is controlled using I2C bus. image

Therefore, we should use external I2C RGB LED hardware to support PX4 indication, and leave the on-board LEDs solely for Nuttx or user.

Possible sources to purchase: https://www.aliexpress.com/i/33003820063.html?spm=2114.12057483.0.0.68ae6ae8OCkiEo https://item.taobao.com/item.htm?spm=a230r.1.14.19.3b48c8e8Q7KrWw&id=595395986172&ns=1&abbucket=12#detail