Replies: 2 comments
-
Hello @LelioG ,
Please, give a look at this code to see how to use multiple sensors in I2C. |
Beta Was this translation helpful? Give feedback.
-
Hi @LelioG ,
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,
I am reaching out regarding an issue with the library associated with the VL53L8CX sensor, specifically the function vl53l8cx_stop_ranging().
My goal is to operate multiple SATEL-VL53L8 sensors directly on an Arduino DUE without using a P-NUCLEO-53L8A1 by connecting the SATELs directly to the Arduino DUE board. The method I found involves initializing the sensors by changing their addresses according to the protocol provided by ST, starting a ranging session for one sensor with vl53l8cx_start_ranging(), collecting its data, stopping the ranging session with vl53l8cx_stop_ranging(), and then starting the ranging session on the second sensor.
This method works, but the problem is that the vl53l8cx_stop_ranging() function takes about 1 second to execute, making it impossible to achieve my goal of running the sensors at more than 20Hz if I have to call this function each time.
I would like to know if it is necessary to call this function every time I want to switch to another sensor and, if so, how I can improve its execution time.
Thank you for your assistance.
To reproduce :
My code :
Desktop :
OS: Windows 11 / Ubuntu 22.04
Arduino IDE version: 2.3.3
STM32 core version: N/A
Library version: 1.0.4
Tools menu settings if not the default: N/A
Upload method: Default serial
Hardware :
Board Name: Arduino Due ( Atmel ATSAM3X8EAU ARM )
Hardware Revision: N/A
Extra hardware used if any: No
Beta Was this translation helpful? Give feedback.
All reactions