[SOLVED] GoPiGo3 distance and LightColor sensor

Hi, Is it possible to get those two sensors working together? They both use a I2C port, and they seem to interfere with each other. The script stops working without any error messages when it’s run and after I detach the LightColor sensor it immediately starts running the script with no problems. The line where it gets stuck is where the distance sensor is initialized, which is done after initializing the lightColor sensor.

Hello @t6hyja01
Yes they can be made to work together but order matters.

You need to initialize the Light Color Sensor before the Distance Sensor. The Distance Sensor will see its preferred address is already taken and will switch to its secondary address.

Cleo

Thanks, it works now. I think there should me some kind of remark in the documentation regarding this issue.

1 Like

@t6hyja01

Glad to see it’s working just fine for you. And you do bring a good point about the documentation. I guess we forgot about that one.

Cleo