2021-03-24 07:53 AM
Unused code detected:
VL53L1_Error VL53L1::VL53L1_RdByte(VL53L1_DEV Dev, uint16_t index, uint8_t *data)
{
int status;
status = VL53L1_I2CRead(Dev->I2cDevAddr, index, data, 1);
//FR bug :: I2CRead exits always with 0! why the following check? Unused.
if (status) {
return -1;
}
return 0;
}
2021-03-25 05:10 PM
The I2CRead function has to be implemented for the customer's MCU. It's maybe that some implementations have a non-zero status from the call.
Some might not, but we cannot count on that.
2021-03-26 11:34 AM
Hello John,
which of the lIbrary functions is like this that we, customers, have to adapt.
I did not mention this (Wire, I2C Bus etc.). Maybe it was written somehow.
I got a Interrupt based version running, but with a very difficult timing of VL53L1_ClearInterruptAndStartMeasurement()
and
L53L1_GetMultiRangingData()
It seems not to be a real Shakehand because of the timing.
But I'll write this in an extra message these days. This sensor is very difficult to get it run. I've had never this before.
Best regards
Frank
2021-04-02 01:05 PM
I solved the problem. The provided examples software for Arduino Environment's never worked. I will publish my example and the working solution at my GitHub the next days. It's running on ESP 8266 and ESP32 and STM platforms.