Anyone succeeded to install external LEDs on Pixhawk?

On APM we could configure the param Led_mode to a binary value representing which actions turn LEDs on A5 and A6.

Is there an equivalent feature on Pixhawk? Found nothing in the wiki about it.

Thx for any info,


Views: 18425

Replies to This Discussion

For Arduino programmers. An Arduino library.


The LED strip arrived and I'm slowly getting time back to tinker with hobbies, but I think I'll go the Microchip MCU initially as I can get going faster with it.


Excellent pls post your progress!

On a related subject I bought these http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=...

I really like these!! The lights do the two most important things for me. They help with orientation and let me know when the battery is low [ handy if you don't bother with telemetry or don't have that ].  I built my own quad and installed LED's on the booms, red in front, green in rear. So these lights have a matching super bright red LED and green LED I place respectively aiming forward not down. It's amazing how much it helps with orientation. Simply hit the yaw and when you see bright red you know its aimed back at you. The lights are solid until 10.5 volts is reached at which point they flash quickly.  If I were smart enough to write the code I would have externally controlled LED's to do only what the pixhawk LED does. Seems like if it starts trying to communicate modes that could really get complicated for the user. The same flashing yellow light used for low bat could also be used to indicated a RTL failsafe event like it already does on the Pixhawk. Anyway just my two cents. I sure wish I could help with the code but that is certainly not my forte :[

Nice use of LEDs.

Since I asked the question, 3DR and resellers sell an external pixhawk led you can simply connect on the I2C port.

Yea I've used those. I wish the pixhawk had two I2C ports so you didn't need to about tripping your wiring to use one.

Hi Richard, you can use the four I2C ports extension that comes standard with the pixhawk.

One limitation of the Toshiba RGB LED (which is what's in the Pixhawk RGB LED) is that it has a fixed I2C address.  This means that only one can be present on each I2C bus.  On the Pixhawk the RGB LED that's on the board uses the "internal" I2C bus, if you plug an external RGB LED into the board's "I2C" port then it's connected to the "external" I2C bus.  It would be possible to light up both the RGB LED on the board and one that's plugged inextenally but we don't do this at the moment.

Ahhh I see. That explains why only one comes on. I've had an issue a couple times with connecting an external LED and it didn't work rather the internal one still did as though the Pixhawk didn't see the external one here. Yet plug in a different one and suddenly it works. fyi this was with a China LED's not 3DR. Remember that old verbiage 'scuzzi voodoo' ? Referencing when multiple hard drives were connected via scuzzi cables sometimes for no apparent reason you had to disconnect them and then connect them in a different order and then all worked as planned. On paper it shouldn't matter but....

In perfect world I'd love to see the pixhawk with 2-3 I2C ports for a much cleaner wiring install for LED's and or a second compass availible for failover. Nothing hundreds of thousands of man hours and a tremendous amount of resources couldn't accomplish whilst I simply sit around and wait :] 

How would one go about implementing that both the internal and external LEDs light up?

I installed the external led on the bottom of my Y6 with the thinking of being able to see it while flying. Unfortunately I lose the ability to see the light while arming on the ground.


If you want to do it in software, it would require changing the PXFirmware's rgbled driver so that it starts a driver on both the internal and external I2C buses.

A simpler solution though is just to split the I2C line and run it to two RGB LEDs.  Because the LEDs simply listen I think it will work.

Thanks Randy!

I see in the code where it looks for the external led first and if not found then loads the internal led. Im tempted to mess with the code, but i agree that just adding another led to the i2c splitter is the simpler solution.

it would be good to have option with LEDs to see or show fly mode


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service