Hello everyone and thanks in advance for your help.
I am connecting a VL53L4CD distance sensor to an Arduino Mega board, I am using a 2 meters wire, but it is too long and calling the init() function always returns false.
I think the problem is the 2 meters wire, because when I use a 50 cm wire, it works just fine.
My question is: how can I connect the VL53L4CD and the Arduino Mega with a 2 meters wire? Do I need some electronic device or component in the middle?
Thanks so much
Hello.
I2C is generally not intended for long distances. One method to cover a 2m distance could be to convert to a different communication interface (such as RS-485), then convert back to I2C on the other side. Alternatively, you could try an I2C bus extender. This post on Stack Exchange mentions one that is supposed to be good for 30m distances (although, please note that I have not tried it). That post also gives some good suggestions for generally improving the signal quality for long distances, so you could try some of those suggestions first.
Brandon
1 Like
Thank you so much, Brandon.
I will check that post.