Ardupilot I2c devices not communicating after address change

Yes indeed, the rangefinders still show “no data”

what address do you get when you scan using this, it should register as device address 41.

I can resolve the address, I can also read from it if I connect another I2C master to the bus

how did you determine that ardupilot can detect it?

If I remove the device the auto pilot reports “rangefinder 1 not connected”
If the device is present it reports “rangefinder 1 no data”

There are three possible issues. The first being make sure the signals are right so figure out the pull up resistors:

It depends a bit on what is connected to the bus.

“The I2C bus must have pull-up resistors, one on the SDA line and one on the SCL line. They’re typically 4.7K or 10K ohm, but should be in the range of 2K to 10K.”

It goes on to talk about if there are already pull-ups on the boards you are using. If it is tldr or your eyes glaze over just pick a value with what you have. (resistance is additive serially so two 4.7k in serial would be closer to 10k) All you are doing is trying to square off the signal waves and pull them closer to ground so the receiver can differentiate the signals easier. Using a scope would be ideal, but most people don’t have one.

sometimes if they include a pull up on the board expecting to be the only board on the chain, it is easier to replace it with a 0 value.

if you want the video version:

If you don’t want to bust out the slide rule. :stuck_out_tongue:
https://atman-iot.com/blog/i2c-pull-up-calculator/


The next issue is how the bus id’s are assigned.
I only briefly looked but the docs for the VL53L1X appear to be saying they are defined by a software.They all start initially with the same device id. then you have to reset the chip while it is still powered using a gpio. To save gpio pins, if you configure them in a specific way you can use the same gpio to reset all of them. It might be detecting it, it gets sent the write value, and is waiting for the reset rather then sending data.

There are multiple speeds for i2c, you have to use the lowest common denominator. If say the controller supports 400k, and one device support 400k, but the next one only supports 100k, you have to set the whole bus to 100k. if the 400k device, doesn’t support 100k, you need to use another i2c bus because you can’t hard set it to 100k. If it isn’t set correctly, then the controller can’t figure out what the 400k signals are, which is similar symptoms to the pull up resistor issue.

Run the i2c lua script and verify that its being detected.