2020-06-03 11:00 AM
I can't get the data transmitted faster than every 487ms or about 0.5s. And that's with the Motion Sensor Update Rate set to 40Hz. I've set the DM (Distance Mode) to short (=1), the TimingBudget to 20 ms and the InterMeasurement down to 25ms.
The relevant code is in sensor.c around line 640;
case PROXY_ON:
do {
ret_err = 0;
ret_err = VL53L1X_SensorInit(VL53L1_I2C_SLAVE_ADDR);
ret_err = VL53L1X_SetDistanceMode(VL53L1_I2C_SLAVE_ADDR, 1);
ret_err = VL53L1X_SetTimingBudgetInMs(VL53L1_I2C_SLAVE_ADDR, 20);
ret_err = VL53L1X_SetInterMeasurementInMs(VL53L1_I2C_SLAVE_ADDR, 25);
ret_err = VL53L1X_StartRanging(VL53L1_I2C_SLAVE_ADDR);
} while (ret_err != 0);
ProxyStatus = PROXY_RANGING;
break;
I can easily slow the sample rate to 1Hz , so i know i'm in the correct code region, but can never get it better than 2Hz. Meanwhile the accelerometer data is streaming in at 10Hz easily. I assume that the data rate for the VL53L1X sensor is restrained to permit the accelerometer data to properly stream. The smartphone displays the positional info on the "dice" quite faithfully in near real time.
Thanks in advance for any help.