-
Hello, I'm currently experiencing issues with using SATEL-VL53L8 sensors directly on an Arduino DUE without the P-NUCLEO-53L8A1. I'm unable to achieve a 4X4 resolution at more than 20Hz because the vl53l8cx_get_ranging_data() function takes 50 ms to execute. Other functions in the void loop() are negligible in comparison. I've attempted to set the SATEL's frequency to 60 Hz using vl53l8cx_set_ranging_frequency_hz() and adjusting the integration time to 15 ms with vl53l8cx_set_integration_time_ms(). However, my goal is to achieve a 60 Hz frequency, as theoretically possible according to the documentation. Additionally, I've managed to achieve the 8X8 resolution at the 15Hz frequency specified in the documentation. Thank you for your assistance. My code :
Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
/cc @cparata |
Beta Was this translation helpful? Give feedback.
-
Hi @LelioG , Wire.setClock(400000); Then, consider that the "print" takes some time to be executed. If you want to reach the maximum frequency, you should remove them from the code. |
Beta Was this translation helpful? Give feedback.
-
Hello @cparata, |
Beta Was this translation helpful? Give feedback.
Hi @LelioG ,
you could try to set the I2C speed at 400KHz to speed up the write/read operations from the device registers. You can just call after the Wire.begin() the following API:
Wire.setClock(400000);
Then, consider that the "print" takes some time to be executed. If you want to reach the maximum frequency, you should remove them from the code.
Best Regards,
Carlo