Using lidar in Auto Mode

I want to use TFMini lidar in auto flight mode. Is possible in some way to use the lidar. Please help.

Could you solve the poblem ?