Qwiic LED stick APA102c python issues

I have a pi zero w running updated buster, sparkfun qwiic shim, and a sparkfun qwiic led stick. I’ve installed and am using the sparkfun python libraries: qwiic-i2c-py, qwiic_py, and qwiic_led_stick_py.

i have tested the shim and qwiic cables i’m using with other sensors that all behave and operate as expected. when i run i2cdetect while the qwiic led stick is plugged in i see an entry for 23 as expected

However, when I try to run any of the examples for the qwiic led stick from the github, I get various unexpected behavior. For example, if i run example 1, blinky, various lights of different colors and brightnesses flash to start, then LEDs 5-9 will turn on, then they will turn off and 0,1,2 will turn on with 2 being red and the rest white, then they’ll turn off and 5-9 will turn on again, then off and then 2 will be blue or red. and when i exit the code, leds 0-4 will stay on. if i go to run the code again, i’ll get an OSError: Errno 121 Remote i/o error. but if i run i2cdetect immediately after getting that error i still see an entry for 23 as expected.

I get similarly unexpected results from running any of the other examples. I don’t even know where to start trying to figure out what’s going on and would appreciate any help.

-Tim

further testing makes it seem like the two halves of the board are out of sync or something using the pi zero.

if i jump into python on the pi zero and run the following commands, LEDs 5-9 as numbered on the board turn on.

import qwiic_led_stick
mystick = qwiic_led_stick.QwiicLEDStick()
mystick.begin()
mystick.set_all_LED_brightness(2)
mystick.set_all_LED_color(50,50,50)

if i run mystick.LED_off(), LEDs 5-9 turn off and 0-3 turn on.

if i run the set_all_LED_color command twice in a row, first 5-9 turn on and then 0-4 turn on. and then i have to run mystick.LED_off() twice in a row to get all of them to turn off.

and finally, if i’m running any of the single led color commands, i have to run it twice if my led is 0-4 as labeled, but 5-9 turn on the first time and the same command count for turning off the LEDs afterwards.

Which version of the Qwiic LED product are you using?

Try unplugging and reattaching the board. The APA’s have memory and might just need to be reset.

I have unplugged it several times. Im using the qwiic LED stick APA102C, Sparkfun product 18354

Could you provide a video of the issue by chance? YouTube would be fine.

happy to!

https://youtu.be/yDJnKR4xg6E

We tested your setup inhouse and seem to not be running into the same issues.

Hmmm, try pressingly lightly on the SHIM and see if that solves the issue. There could be a continuity problem with the i2c lines. A light press may provide a solid connection.

Also, there is a slim chance that perhaps something is up with the LED length setting. try running example 9 (https://github.com/sparkfun/Qwiic_LED_S … _length.py) with the length set to 10 and see if that is the issue.

Let me know what happens.