I have connected a VL53L0X ToF-Sensor to the Zumo-Shield-Board pins V5, GND, SCL, SDA, 11. In combination with a Arduino Leonardo R3 board this ToF-Sensor works fine. But when I include code for the reflectanceSensorArray and as soon the QTRSensors detect the ground, the VL53L0X outputs -1 and Timeout has occured.
General Question:
Do I have to care about the adresses of the registers of the i2c bus? Does the VL53L0X and the ReflectanceSensors are writing into the same registers and therefore produces errors?
I am sorry you are having trouble getting that time-of-flight sensor working with your Zumo. It sounds like you might be worried about a conflict from multiple I²C devices sharing the same address, but none of our QTR sensors (including those on the Zumo reflectance sensor array) are I²C devices, so I do not suspect that to be an issue.
I suspect this issue to be likely because you are using pin 11 on the Leonardo, which the Zumo connects to one of the outputs of the QTR sensors on the reflectance array. XSHUT on the VL53L0X should not really be necessary for using a single sensor; can you try removing your connection between XSHUT and pin 11? You should also remove the part of your code that pulls up pin 11:
pinMode(11, INPUT_PULLUP); //on VL53L0X XSHUT pin
By the way, if you have not already, can you make sure your LED array is appropriately configured for use with a Leonardo by connecting the blue shorting block between the LEDON and A4 pins? You can learn more about that by reviewing the “Adding a Zumo reflectance sensor array (optional)” section of the Zumo’s user’s guide, which you can find under the Resources tab of the Zumo’s product page.
thank you very much! After connecting LEDON with A4 and deleting the code line with the pin 11, there occured no errors anymore. I left XSHUT unconnected now, but in the documentation of the VL53L0X is written, that XSHUT should be pulled up, so I have chosen pin 11, in the first place.