I2C - Lidar-Lite Laser Module

How To Add This Control To Your Project

Step #1) Load the most recent release of EZ-Builder
Step #2) Press the Project tab from the top menu bar of EZ-Builder
Step #3) Press Add Control from the button ribbon bar of EZ-Builder
Step #4) Choose the I2C category tab
Step #5) Press the Lidar-Lite Laser Module icon to add the control to your project


Description

Lidar-Lite Distance Sensor connects to any of the three i2c ports. The Lidar-Lite is a laser based measurement solution supporting a wide variety of applications (e.g. drones, general robotics, industrial sensing and more). Measures distance, velocity and signal strength of cooperative and non cooperative targets at distances from zero to more than 40 meters.



*Note: You will need to solder the i2c wires from the Lidar-Lite to an EZ-B v4 I2C Peripheral Cable (25cm) to connect to the EZ-B v4's i2c. Additionally, the Lidar-Lite requires +5v which can be powered by an Inline 5V regulator (30cm).

This EZ-Builder control will read data from the sensor and set EZ-Script Variables, respectively. If the sensor is not connected, the EZ-B v4 will lock up. This control will not read data automatically. We have provided a ControlCommand() for querying the device and setting the variables. Each time you wish to receive data from the Lidar-Lite, you must ask the control to RUN ONCE with ControlCommand().

Here is an example code for looping every 100 milliseconds to request distance data. The data from the Lidar-Lite will be stored in EZ-Script Variables. You may press the CONFIG button on the control to see what variables are being set with data. Ensure you have an Lidar-Lite EZ-Builder control added, an Lidar-Lite laser module sensor connected to the i2c of the EZ-B, and paste this code into an EZ-Script control. When this script is running, the Lidar-Lite will continually update the specified variables with data every 100ms. Check the Variable Watcher to view the data from the sensor.

:loop

ControlCommand("Lidar Lite", RunOnce)

print("Distance: " + $lidar)

sleep(100)

goto(loop)



Note: EZ-Robot is not a manufacturer of this third party hardware device. . Nor is ezrobot responsible for the operation of this third party device. For operational questions, it's best to consult the instruction manual for operational instructions.


Related Articles: N/A