Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIDARLite v4 LED Library - max measurement 255cm #19

Open
paw1682 opened this issue Jun 12, 2020 · 1 comment
Open

LIDARLite v4 LED Library - max measurement 255cm #19

paw1682 opened this issue Jun 12, 2020 · 1 comment

Comments

@paw1682
Copy link

paw1682 commented Jun 12, 2020

I am new to Arduino programming and playing around with a Sparkfun Redboard Artemis nano connected to a LIDARLite v4 LED via the Qwiik connector. When running the GetDistance example I noticed I could not obtain a measurement over 255cm. It would jump back to low measurments like 1cm. I noticed the in the library that the getDistance function was only declared as uint8_t (8bit). Thus the reason for the max value of 255. I changed the getDistance funtion declaration to unit16_t in both the LIDARLite_v4LED.h and the .cpp library files and now I am able to get measurements over 255cm.
Attached are the updated files.
LIDARLite_v4LED.zip

@paw1682 paw1682 changed the title LidarLite v4 LED Library - max measurement 255cm LIDARLite v4 LED Library - max measurement 255cm Jun 12, 2020
@jmseitz
Copy link
Collaborator

jmseitz commented Jun 23, 2020

There is an example titled "GetDistance" for the LIDAR-Lite v3, but nothing of that name for the v4. Are you sure you are using examples and libraries intended for the v4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants