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.
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.
Thanks, it works now. I think there should me some kind of remark in the documentation regarding this issue.