ESP32 with LiDar Sensor for distance calculation

Hello everyone,

I am new here, I was searching on my project and came to a thread on this Forum, but couldn't find the solution to my issue. So, I thought to ask for it.

I am working on the ESP32 board and my project is to design an indoor localization robot. I need to use the Lidar sensor, which will act as the robot's eyes. I have designed the robot and moved the motors successfully.

Now I am trying to interface the Lidar sensor with the ESP32. I have doubled checked the wiring, its all perfect. But I am trying to get the distance of an object from the robot and no sucess. Could someone please guide me in the right direction. How to calculate the obect distance using lidar and esp32?

For reference:
This version of ESP32: https://www.theengineeringprojects.c...lications.html
This lidar sensor: https://www.amazon.com/Single-Point-.../dp/B07B631YRF
Following this tutorial: https://www.waveshare.com/wiki/TF-Lu...R_Range_Sensor (ESP32 section)

Any help would be appreciated
Thanks.