Garmin LIDAR-Lite v4 (Qwiic) Hookup Guide

Pages
Favorited Favorite 0

Arduino Examples

Example 1: Basic Readings

Once you've got the library installed, open the Example1_GetDistance sketch. You can find it under

File > Examples > SparkFun Garmin LIDAR-Lite v4 Arduino Library > Examples

Then upload the sketch onto your RedBoard or Uno and open your favorite Serial Terminal to see the printed values. (Don't forget to set the baud rate to 115200bps.)

streaming data
Distance readings from the LIDAR sensor. (Click to enlarge)

Example 2: Address Change

Note: The Qwiic LIDAR-Lite v4 will reset to the default I2C address if power is disconnected.

Open the Example2_ChangeI2CAddress sketch from the library examples.

Once the sketch has been uploaded, open up a Serial Terminal with the baud rate set at 115200bps. There, users will be prompted to input a value to change the I2C address.

user prompt
Prompt for changing the LIDAR sensor's I2C address. (Click to enlarge)

Following the address change, the sketch will scan the I2C bus for connected devices and display their address. Users should see the LIDAR sensor at the address they specified.