2023-01-04 06:02 AM
2023-01-17 07:50 AM
With the VL53L0X there are an absurdly large number of registers. So many we don't expect you to bother reading them. Better to use the API. The API is code delivered to your project when you use STM32CubeMX and build your project.
Just tell the MX code that you have the VL53L0X and the code will be inserted in your project.
(I say "just" but this takes a fair bit of figuring out. I never get it right the first few times. But it's possible. I've seen people do it.)
After you build in the API into your CubeMX project, the created code will work. Next, I'd steal the example code and push it around a bit to make it do what you want.
It's a matter of calling the init function, setting a few timings by calling API funtions, calling the start routing, waiting until it's done (or getting the interrupt) reading the data and clearing the interrupt.
There are functions for all of this. The example code shows you how.
2023-01-18 07:02 AM
Hello, with examples is everything okay, it's work. But the huge problem is to run it on my code, such you have a "function" which control a VL53L0X device and just call it on 'while' cycle, like you have a same sensor with registers , which value you have to read. There is no VL53L0X on CubeIDE, there is just 53L3A2, 53L5A1, VL53L3CX and etc.
P.S. Sorry, my english lanuage is so poor....