LidarLitev2 Library for distance reading. Capable of both single distance reads and continuous distance read setup.
Dependents: Lidar_Distance Lidar_DistanceContinuous Lidar_2D_Mapping Motions_Secure_Server_IUPUI ... more
LIDAR Lite v2 Blue Label
The Lidar Lite v2 from PulsedLight
The LidarLitev2 from Pulsedlite is a low cost($115) lidar system with I2C interface. They are available from sparkfun and robotshop. It utilizes lidar(Laser Radar) technology for ultra fast and ultra precise measurements. Here is the wiring utilized for the first demo program.
Wiring¶
mbed | Lidar-lite |
---|---|
5V=VU | 5V |
SDA=P28 | SDA |
SCL=P27 | SCL |
Gnd | GND |
As with all I2C devices this device requires a SDA(Serial Data Line) and a SCL(Serial Clock Line). The mbed pinout can be referred to for other I2C setups.
Using Lidar on Breadboard¶
The Lidar comes with a proprietary cable for connecting the device. This cables can be seen in the photo below:
Thankfully these cables are pre-soldered and thick enough to fit right into the breadboard with no modifications. Only one change was needed to plug this device onto a breadboard. The device connects to mbed's VU(5V) pin which is supplied from USB and has DC stabilization issues. To solve this connect a single capacitor or several capacitors in parallel (C1 + C2.. + Cn) to achieve 680uF or greater. This will provide the stabilization required for the lidar to detect distance with insignificant noise. Below is a picture of the device fully connected to the mbed with capacitors.
Demo Program 1¶
#include "LidarLitev2.h" LidarLitev2 Lidar(p28, p27); Serial pc(USBTX,USBRX); Timer dt; int main() { pc.baud(115200); Lidar.configure(); dt.start(); while(1){ pc.printf("distance = %d cm frequency = %.2f Hz\n", Lidar.distance(), 1/dt.read()); dt.reset(); } }