I’m currently working on an Arduino project and using the Lidar Lite V4 sensor purchased from Mouser. However, I’ve encountered an issue that requires some technical assistance.
Here’s the problem: when the sensor detects multiple objects simultaneously, it behaves inconsistently. While it provides accurate readings when detecting a single object, it starts giving inconsistent distance readings when faced with partial detection of multiple objects.
To demonstrate the issue, I’ve attached a video. In the video, you’ll notice that if the sensor detects both the ceiling and a paper (partially), it doesn’t output the closest value(first return), which is essential for my project. Instead, it provides a value somewhere in between.
I’ve consulted Garmin’s support documents since they manufacture the Lidar Lite V4, but I couldn’t find a solution specific to this issue. Mouser directed me to seek help on the SparkFun forum.
If anyone has insights or guidance on troubleshooting and addressing this matter, I’d greatly appreciate it. Getting this sensor to behave properly is crucial for the successful completion of my project.
Thanks for any assistance you can provide! Looking forward to your responses.
You can change the mode or alter the code to suit your purposes https://github.com/sparkfun/SparkFun_LI … ED.cpp#L75 …by default it isn’t necessarily meant to dynamically switch between ranges, but you could code for it to do so and/or only return the shortest distance (go through the functions and call them as needed)
Thanks for your response and the suggestion to change the mode. Unfortunately, I’m not quite confident in my coding skills to figure out how to alter the code effectively. I did give it a shot based on your advice, but I’m still encountering the same issue.
I’ve attached a code snippet I’ve been tinkering with for more context. My goal remains the same: ensuring that the sensor consistently returns the shortest distance, especially when dealing with objects partially within its beam. Despite adjusting the mode, I’m still facing inconsistent readings in these situations.
If you could offer some guidance on tweaking the code to address this problem, I’d greatly appreciate it. Your expertise in navigating the functions and making the right tweaks could really help me achieve the behavior I’m aiming for with the sensor.