I see this line in multiranger.c :
vTaskDelayUntil(&lastWakeTime, M2T(100));
I decreased it but the maximum frequency I can get seems to be around 15hz only. Meanwhile, in this thread(viewtopic.php?t=4764), I see that the developers were able to get 25hz.
How do I increase the output rate of the multiranger deck further?
How to increase output frequency of multiranger deck?
-
- Beginner
- Posts: 6
- Joined: Tue Mar 01, 2022 3:40 am
Re: How to increase output frequency of multiranger deck?
You need to adjust the VL53L1 timing budget as well. Check zranger2.c for an example. There is a trade-off in accuracy and range though. I suggest you to consult the VL53L1CX datasheet for more details.
You can probably do this in multiranger.c (have not tested)
You can probably do this in multiranger.c (have not tested)
Code: Select all
// Init VL53
if (vl53l1xInit(pdev, I2C1_DEV))
{
// Configure timing budget
VL53L1_SetDistanceMode(&dev, VL53L1_DISTANCEMODE_MEDIUM);
VL53L1_SetMeasurementTimingBudgetMicroSeconds(&dev, 25000);
DEBUG_PRINT("Init %s sensor [OK]\n", name);
status = true;
}
else
{
DEBUG_PRINT("Init %s sensor [FAIL]\n", name);
status = false;
}
-
- Beginner
- Posts: 6
- Joined: Tue Mar 01, 2022 3:40 am
Re: How to increase output frequency of multiranger deck?
Thanks! I added the lines
and I was able to get around 20hz now.
Code: Select all
VL53L1_SetDistanceMode(&dev, VL53L1_DISTANCEMODE_MEDIUM);
VL53L1_SetMeasurementTimingBudgetMicroSeconds(&dev, 25000);