Emmanuel Katto Dubai : Issues with Qwiic LED Stick: Some Pixels Don't Respond Consistently

I’m Emmanuel Katto from Dubai, United Arab Emirates (UAE) using about 10 Qwiic LED Sticks in a project, each with its own controller. However, I’m running into a strange issue where some of the pixels randomly fail to respond to commands. For example, if I call setLEDColor() to turn all the pixels off, 9 out of 10 will follow the command, but one stays on. Similarly, if I try to turn them all off with LEDOff(), one pixel might stay on while the others turn off.

This behavior seems random—sometimes everything works fine, and sometimes it doesn’t. I’ve tried adding delays (a few milliseconds) between commands or repeating them, but it doesn’t seem to help. I’ve also double-checked to ensure that no other I2C operations are interfering with the commands.

Has anyone experienced something similar? Any suggestions on how to make the LEDs behave more reliably?

Regards
Emmanuel Katto

Odd, we saw someone else recently with the same problem Qwiic LED Stick doesn't like to do what it's told

How is the setup being powered? How many devices are on the i2c bus, and how many sets of pull-up resistors are active on it?

For my setup:

Controller: Arduino R4 Wifi
Power: 12V, 3000mAh hour battery, connected to Vin pin
1xQwiic LED Stick - brightness set to 1
2xQwiic LED Button, LED’s are off
1xQwiic 14 segment display, brightness set to 1
1xQwiic RFID reader

I have written the code to limit I2C interactions, and to delay in between commands. During the time period i question when the behavior happens, a state change has occurred in the system and a command is sent to each device to set it up for that state, with a delay(10) in between each command. For example, button.clearEventBits(); button.LEDOff(), fourteenSegment.print(“PLAY”), then, this is the current method I’m using to set the LED stick color - it is quite busy due to trying to get it to behave correctly:

qwiicLEDStick.LEDOff();
delay(10);
qwiicLEDStick.setLEDBrightness(1);
delay(10);
for (int i = 0; i < 10; i++)
{
qwiicLEDStick.setLEDColor(i, r,g,b);
delay(3);
}
delay(10);

other state changes are similar, however they just call

qwiicLEDStick.LEDOff();

these commands sometimes result in one and usually only one LED that stays in the previous state.

At the time of posting, I had not disabled any of the pullup resistors on the devices, but everything was working - except that sometimes the LED stick behavior already mentioned.

After posting, on one of my devices i disabled all but one of the I2c jumpers on each device that had them, being very careful with a hobby knife to cut the jumper and using a multimeter/continuity to verify. After that, one of the Qwiic LED button would initialize and when i sent a command to turn on the led button briefly, it “crashed”, i.e. the power light went out on it, the command failed and after that nothing worked. so i had to replace it. Cutting those jumpers must be a very precise operation… Anyways, still testing the LED strip to verify if the behavior is gone or not. It takes a bit to get the whole system up and running to where i can test the behavior in question. I will post results once i have them.

All that said, I do find it interesting that a single command would partially succeed, independent of the i2c jumpers. The behavior I saw was that if all the LEDs are on, and I call LEDOff(), all but one of the lights turn off, usually light 0 or 9 stays on. If the single command gets to the board, wouldn’t you expect that it is not the command getting there that is the problem and something on the board? … I do recognize that the coding of the command in your library you may actually internal to the LEDOff command you may just iterate through each light and send a single command to turn it off, in which case this comment is invalid.

Ok, I hadn’t noticed the previous issue on the github for this SetLedColor array overload doesn't update LEDs 0-3 correctly · Issue #4 · sparkfun/SparkFun_Qwiic_LED_Stick_Arduino_Library · GitHub

We’re going to get a plan together and I’ll circle back here with an update soon

Ok, so after some more digging we found that adding a delay of 100 or more seems to work fine (the example doesn’t use a delay at all!)

Try this’n Example07_Cycle_Rainbow_MOD.ino · GitHub