Page 1 of 1

Controlling the onboard LEDs (M1, M2. M3, M4) in Python

Posted: Tue Sep 21, 2021 5:22 pm
by mbaytas
We'd like to take control of the onboard LEDs (M1, M2, M3, M4) while flying with a synchronous Python script, and write R/G/B values in real time like we do on the LED ring.

We have searched the library source, docs, and the forum to find how to do this. The closest we got was a post from a few years ago (viewtopic.php?t=2695), where the answer is basically "no." I'm wondering if there are any new developments since then.

Re: Controlling the onboard LEDs (M1, M2. M3, M4) in Python

Posted: Wed Sep 22, 2021 8:42 am
by kristoffer
Hi!

It still works the same way and the previous answer is still valid.

Please note that the LEDs are not RGB and it will not be possible to set any color. The two front LEDs are red/green and the two at the back are blue only (see schematics https://www.bitcraze.io/documentation/h ... _rev.b.pdf)

Re: Controlling the onboard LEDs (M1, M2. M3, M4) in Python

Posted: Thu Sep 23, 2021 9:06 am
by tobias
I just created an github issue for this and there is a patch there you could try out.

Re: Controlling the onboard LEDs (M1, M2. M3, M4) in Python

Posted: Fri Oct 15, 2021 9:28 am
by tobias
A implementation has now been merged in PR#854