An Arduino library to interface with the cheap UT390B Laser Distance Meter
GPL-2.0 License
This is a library to interface with the cheap but good UT390B Laser Distance Meter using an Arduino. It supports simple blocking measurements and more advanced asynchronous measurements for time critical projects. It is based mostly on information gathered from this blog post and its two follow-ups.
To install the library just download the .zip file and look here for further instructions. You can also just clone this git repository into you libraries folder:
cd <yoursketchbook>/libraries/
git clone https://github.com/ernestum/UT390B_Arduino_Library.git
After a restart of the arduino IDE you are done!
Just have a look at the two examples. They are fairly self explaining.
Be aware, that the UT390B runs at 2.7V. A 5V Arduino or even a 3.3V would fry it when connected directly. Actually somebody else had trouble getting it to work with 3.3V at all. This is how I connected mine to a 5V Arduino: