How to add the Lidar-Lite Laser Module robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the I2C category tab.
- Press the Lidar-Lite Laser Module icon to add the robot skill to your project.
Don't have a robot yet?
Follow the Getting Started Guide to build a robot and use the Lidar-Lite Laser Module robot skill.
How to use the Lidar-Lite Laser Module robot skill
Lidar-Lite Distance Sensor connects to any of the three i2c ports. The Lidar-Lite is a laser-based measurement solution supporting various applications (e.g., drones, general robotics, industrial sensing, and more). Measures distance, velocity, and signal strength of cooperative and noncooperative 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 [url=https://www.Synthiam.com/Shop/AccessoriesDetails.aspx?productNumber=101]EZ-B v4 I2C Peripheral Cable (25cm)[/url] to connect to the EZ-B v4's i2c. Additionally, the Lidar-Lite requires +5v which can be powered by an [url=https://www.Synthiam.com/Shop/AccessoriesDetails.aspx?productNumber=98]Inline 5V regulator (30cm)[/url].
This ARC 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 a Lidar-Lite ARC control added and a 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 runs, the Lidar-Lite will 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: Synthiam 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.
use just your I2C devices? Just need to know for sure what it is. Trying to get the lidar working and noticed this discrepancy.
Also, there is no standard for i2c connections. The website from that screenshot is just some random website from some other random product. Read more about i2c protocol here: https://en.m.wikipedia.org/wiki/IC
As @DJ mentioned, there isn't a standard pinout for I2C devices, we decided to go with the pinout of one of the most popular I2C products back when we were developing the board which was the BlinkM standard.
To hook up to the LIDAR lite to an IoTiny you'd likely need an I2C logic level converter, but even then I believe that sensor was a bit finicky with pullup resistors and line capacitance so it may be a bit tricky to dial in. You also need 5V going to the sensor so you would need a 5V regulator attached to it coming from the Vin of the IoTiny. It is possible to use a resistor voltage divider for logic level conversion but that requires a bit of DIY knowledge. I don't have one of these sensors to test with so I can't really give you a 100% wiring diagram that will work.
The price point for these sensors is pretty high compared to a spinning 360-degree LIDAR sensor. I'm not sure I would recommend using the LIDAR lite when you can get a more power LIDAR for around the same price.
The closer the 360 sensor is, the less of the angle you'll detect. The higher the sensor is, the more you'd detect but increase error from a distance.
So, either way, you look at it, a 360-degree sensor won't work for your application.
What I would recommend would be an IR or single laser distance sensor. But use a short-distance version because that would give you the edge, and you'd need to slide over it.
Or, you could have the object on a black surface and use a camera above it to get the shape. A statically mounted camera would give you the object's rectangle as a variable. If the background is black and the object is lighter, that would make detecting it much better.
I thought both types will give you a value for distance. If x value is less than 1/2" from one to another rotational degree that will be your leading edge and if x value is greater than 1/2" that will be your falling edge. Need to just have feedback for rotational angle to make it all work.