OSLRF --working

I’ve lurked these forums for a while. I learned alot and found some very useful things here, and hope this is something interesting and useful to others. :slight_smile:

I’ve been working with the OSLRF-01 open source laser range finder from www.lightware.co.za (it seems they’re not being sold anymore/currently). I found some (slightly) usable code/headers/examples from GitHub - michaeljball/NewPingOSLRF: Open Source Laser RangeFinder -OSLRF01 version of Tim Eckels NewPing Library, which is where I got most of the structure for what I’ve made. I also used this thread https://forum.arduino.cc/index.php?topic=213774.0 to further my understanding of the technology and usage.

The files NewPingOSLRF.h, NewPingOSLRF.cpp, and sketch_jul31b.ino were too long for me to post the code, so I attached them.

I’m not totally finished with it, but i’ve got it returning ~.03" accuracy, with a 1K potentiometer attached and turned to the maximum (otherwise I get ~1" accuracy). We’ll be mounting the laser(s) to a stable table (lol) and using precision tools and standards to verify that the .03" I’ve read are truly accurate. I had not found any usable code for this or anywhere that had working examples, so I wanted to get mine out there.

Hope this is useful and interesting. Thanks for reading. :slight_smile:

NewPingOSLRF.cpp (10.1 KB)

NewPingOSLRF.h (5.95 KB)

sketch_jul31b.ino (4.38 KB)