Dear all,
I have quite a strange problem when trying to add a second sensor to my working environment.
"Old" Sensor: VL53L0x (sensor)
"New" Sensor: VL6180x (sensor1)
- Doing a i2c detect shows that both sensors are on different i2c adresses.
- pullups are in place
- the VL6180x works standalone without problems (on another arduino).
- the clock and data lines of both sensors are connected to the same UNO ports 4 and 5.
Result:
Adding the code for the new sensor doesn't affect the "old" Sensor.
But as soon as I connect the new sensor physically the old sensor stops working. All calls for meassurment of the distance result in "timeout".
Code:
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include <VL53L0X.h>
#include <VL6180X.h>
#define LONG_RANGE //for VL53LOX
#define HIGH_ACCURACY //for VL53LOX
VL53L0X sensor;
VL6180X sensor1;
sensor.init();
sensor.setTimeout(500);
sensor1.init()
sensor1.setTimeout(500);
sensor1.configureDefault();
....
Serial.print(sensor.readRangeSingleMillimeters());
if (sensor.timeoutOccurred()) { Serial.print(" TIMEOUT"); }
...
Any idea how to proceed with troubleshooting?
regards
Michael