If you want a sensor to see 4M like the VL53L1X can, you have to give up a little in the very short distances.
If you switch sensors to the VL53L4CD you can do a bit better. I can get good results down to 5mm, but below that one only knows 'very near'. It's linear, but not really accurate at the very close distances.
The best compromise between the two sensors is the VL53L4CX. Distance to 6m, linear down to 1cm.
The L4 line has a different VCSEL (laser). Narrower FoV at 18 degrees. But it's single mode makes it a touch better at the very near distances.
Both are pin compatible with the L1 line - but slightly smaller and less tall. (Cheaper too.)
I'd invest in the P-Nucleo-53L4A2. (This is the eval kit for the VL53L4CX) Cost is $56.
Try the L4CX. See if it works using the software from ST.com. You will know in a few minutes if it works for you.
Then download and run the software for the VL53L4CD on the same board. It will work. See if the much easier software works. If it does, then go with the L4CD - slightly less expensive - but the max distance is 1.3M
- john
If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.