APA102C fails to reinitialize on reboot

I am trying to use a system with a TMX8820, Qwiic relay and APA102C LED stick.

Every so often I see one of the devices lose connection (still trying to figure out why this is happening). I am checking isconnected() every so often to see if devices are still acting as they should. If isConnected() fails, the ESP resets and setup is restarted. However, the led stick always fails to begin and I get stuck. It seems the only way to get past this is a power cycle but I need this to happen by itself.

Am I missing something or is the only way to power cycle the led?

What is supplying power to the whole party? The qwiic LED stick can draw a lot of power if all of the LEDs are being turned on

Is everything on the i2c bus?

Using a esp32 wroom (micro usb) board to power everything. Thought that would suffice for powering the chain. I have it hooked up esp->relay->led->lidar using the qwiic connectors so everything is on i2c.

Ran the code with just the lidar values outputting with everything still connected all night and had no problems.

I am using the TaskScheduler library to try to schedule everything.

  1. read values (lidar)
  2. process values
  3. set values (relay and LED)

What I am wondering is if I am calling the next read too quickly after the setting values and that is causing some kind of overload, or it is a power issue? I am stumped at this point.

Ive integrated the relay back in with no led and seems to be working great. Just the led stick giving me issues.

I think I figured it out. I did not see the part about cutting the connection between the i2c pullup resistors on all but one device. Is there a particular device you should leave the resistors (first or last) or just any one in the system?

Just any ONE per bus needs to be active, no ordering :smiley:

Is there a way to reset the ledstick without power cycling? If anything does disconnect I need a way reset the device. But doing that causes a bootloop when starting up the ledstick.

It doesn’t look like it, although you might try resetting the LEDs which does appear to be a function available as ‘LEDStick.LEDOff();’ SparkFun_Qwiic_LED_Stick_Arduino_Library/examples/Example04_SetBrightness/Example04_SetBrightness.ino at c564546badffd3d5da44be33b7d930189fb1f5b1 · sparkfun/SparkFun_Qwiic_LED_Stick_Arduino_Library · GitHub