Devices not working when on an EndPoint connected to Mux port

Building a motorized TV reveal/conceal mechanism. Using:

  • 1x P1AM Arduino microcontroller

  • 2x SparkFun Distance Sensor Breakout - VL53L1X for sensing where the TV is

  • 1x Sparkfun 8x Mux (for above, since they have hard coded I2C addresses)

  • 4x SparkFun QwiicBus EndPoints

  • 2x SparkFun QwiicBus Buttons as contact closure sensors for end-range detection

  • 2x SparkFun QwiicBus Relays to control a linear actuator for a door

(And some other stuff, but not relevant for this post).

Topology is like this:

[imghttps://i.imgur.com/lfW4y1q.png[/img]

(Never mind that’s the wrong Arduino).

I was struggling to get the Qwiic Buttons to be seen on the I2C bus. The VL53L1X devices are working fine.

I started experimenting and found I can get the Buttons or Relays to be seen if:

  1. they are connected to the NEAR end of a bus extender on a Mux port (green line)

  2. they are connected to any port that is NOT on a Mux port (even the far end of a bus extender) (other green line)

Connecting these devices to the far end of a EndPoint that is connected to a Mux port (red line) does not work.

I have verified this with both Qwiic buttons and Qwiic relays (I was so frustrated I just decided to test with the relays).

What am I doing wrong?

https://i.imgur.com/lfW4y1q.png

This all turned out to be user error in programming, partly caused by the fact that I was calling QWIICMUX::begin() with the address of the device connected to the mux.