External Toshiba LED Pixracer

Issue details
Toshiba LED doesnt work from firmware AC3.52

at version AC 3.4.6 I have had the Toshiba LED working.
monitoring the I2C output using arduino I see that the commands printed are:
0x8381 : 0
0x8182 : 1
0x8283 : 1
0x8381 : 0
0x8182 : 0
0x8283 : 0
0x8381 : 0
0x8182 : 1

On the newer versions from AC3.5.2 I have only printed out those commands:


What did you change and how can I get it to work?

I use Arduino to take the values and convert them to WS2812.

How can I fix it?

To clarify: the external LED works. Your arduino code doesn’t.
Your code needs to be compatible with the current driver in the AP_Notify library, which replaced the old one from the px4 HAL.

I’m pretty sure this has been asked and resolved a number of times, so searching the posts here may help you.

Dear James

Thanks for your answer, unfortunately yes it is been asked but after searching for about a week in almost every forum I didnt find the information.

In AP_Notify there are many files, looking at new ToshibaLED_I2C.cpp / ToshibaLED_I2C.h I didnt find what can cause the messages that go out at 0x55 to be shown as 0/1 so I asked here more detailed info what should I look for…
I will appreciate your help.

I don’t get it. The ToshibaLED driver is looking for a device with three LED’s that respond on address 0x55. If your device does not respond to the commands then it’s will ignore you.

The first thing the code does is send an enable to register 3 of the device to enable it. If you don’t respond the driver shuts down.

After that it sends PWM values to the three LED’s do indicate values not 1 or 0.

I drive WS2812 with my unit and I use Telem2 port and decode Mavlink messages so I can do more than just flash the LED’s. I can determine pitch and roll as well as flight modes.


Dear Mike

Do you might have an example code that I can test?

How I send the respond ? what should I send back?

Dear Mike

After some investigation I have a few remarks / questions.

  1. The first thing the code does is send an enable to register 3 of the device to enable it. If you don’t respond the driver shuts down. proven to be NOT TRUE!, I will explain why.
    When the Pixracer load it sends 0x04 & 0x03, it is only to set the registers on the Toshiba chip but it doesnt wait or ask for response and does not disable the functuion when it does not get any response.
    I added a handler in Arduino to check if the controller ask for response by using Wire.onRequest(requestEvent);

void requestEvent(){
Serial.print(“request received”);

and no there is not any request event!
2. More than that the controller continue to send 4 byte values even if there is no response from Arduino…

I guess the reason that I dont see anymore the 0x81/0x82/0x83 is because you are now working at with auto-increment method (0x01).
So the first bit is 0x01 and than the second bit is for red, third bit is for green and 4th bit is for blue. - values of 0 or 1. (0 = off 1 =on)

  1. under Modules/PX4Firmware/src/drivers/rgbled.cpp at line 391 I think it has a mistake.
    if (ret == OK) {
    on = result[0] & SETTING_ENABLE;
    powersave = !(result[0] & SETTING_NOT_POWERSAVE );

From looking at the TCA62724FMG PDF I think it should be:
on = result[0] & ( SETTING_ENABLE << 4 );
powersave = !(result[0] & ( SETTING_NOT_POWERSAVE << 4 ) );

Since the SHDN is at bit-4 and ENABLE is at bit-5.

Am I wrong?

Did you get this sorted out? I’m trying to emulate the Toshiba LED in an Arduino sketch as well. Thanks.

This is a cool option:

I was able to “translate” the Toshiba LED data from the I2C bus. What I don’t like about Mavpixel is it’s reliance on code to translate the Mavlink and decide in lighting. By using the LED data off the I2C bus, the Pix is making the color decisions.

Glad your got it solved. Mavpixel vs mimicking the ToshibaLED is very much an individual preference thing.

however I wound up installing Mavpixel anyway! ha

1 Like

hello . can you provide us with a code example ?

sure. let me find it.

couldn’t find it. sorry.

its ok ,do not worry :clap:

since the toshiba led was discontinewed , why they dont add support for WS2812 ?
they can be controled via a single pin

I recall there being a timing issue.


read on from here:


they say that they managed to get far more strict timings for Dshot . why they dont do it for the led .
i can undestand that its not neccecety for flight functionalyty but the pixhawk has a lot of computation power …:roll_eyes: