LIDAR Lite v3 to a 16x2 LCD

Complete newbie here. I am trying to figure out how to get distance measurements from a Lidar to show on an LCD. Everyone seems to already know how, but I can’t find any tutorials on it. I can see the distances on the serial monitor and I can write words to the LCD, but I can’t get the Lidar to write directly to the LCD. Plus, when I unplug the USB cable and power the Arduino through the barrel connector, the LCD goes completely blank and doesn’t show the startup message I programmed.

Any help would be most appreciated.

(I should probably mention that I made this code by assembling pieces from Examples, and I don’t actually know how to code.)

#include <Wire.h>
#include <LIDARLite.h>

LIDARLite myLidarLite;

#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup()
{
  Serial.begin(115200); // Initialize serial connection to display distance readings

  /*
    begin(int configuration, bool fasti2c, char lidarliteAddress)

    Starts the sensor and I2C.

    Parameters
    ----------------------------------------------------------------------------
    configuration: Default 0. Selects one of several preset configurations.
    fasti2c: Default 100 kHz. I2C base frequency.
      If true I2C frequency is set to 400kHz.
    lidarliteAddress: Default 0x62. Fill in new address here if changed. See
      operating manual for instructions.
  */
  myLidarLite.begin(0, true); // Set configuration to default and I2C to 400 kHz

  /*
    configure(int configuration, char lidarliteAddress)

    Selects one of several preset configurations.

    Parameters
    ----------------------------------------------------------------------------
    configuration:  Default 0.
      0: Default mode, balanced performance.
      1: Short range, high speed. Uses 0x1d maximum acquisition count.
      2: Default range, higher speed short range. Turns on quick termination
          detection for faster measurements at short range (with decreased
          accuracy)
      3: Maximum range. Uses 0xff maximum acquisition count.
      4: High sensitivity detection. Overrides default valid measurement detection
          algorithm, and uses a threshold value for high sensitivity and noise.
      5: Low sensitivity detection. Overrides default valid measurement detection
          algorithm, and uses a threshold value for low sensitivity and noise.
    lidarliteAddress: Default 0x62. Fill in new address here if changed. See
      operating manual for instructions.
  */
  myLidarLite.configure(0); // Change this number to try out alternate configurations

  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);

  lcd.setCursor(2,0);
  lcd.print( "Welcome");

  delay(5000);
  lcd.clear();
  
}

void loop()
{

  // Take a measurement with receiver bias correction and print to serial terminal
  Serial.println(myLidarLite.distance());

  // Take 99 measurements without receiver bias correction and print to serial terminal
  for(int i = 0; i < 99; i++)
  {
    Serial.println(myLidarLite.distance(false));

    // when characters arrive over the serial port...
  if (Serial.available()) {
    // wait a bit for the entire message to arrive
    delay(100);

   lcd.setCursor(3,0);
    // read all the available characters
    while (Serial.available() > 0) {
      // display each character to the LCD
      lcd.write(Serial.read());
      // clear the screen
      delay(50);
    lcd.clear();
  }
  }  }}

but I can't get the Lidar to write directly to the LCD

And you never will. That's why there is an Arduino in between.

(I should probably mention that I made this code by assembling pieces from Examples, and I don't actually know how to code.)

You should definitely mention what that code actually does, and how it differs from what you want.

Plus, when I unplug the USB cable and power the Arduino through the barrel connector, the LCD goes completely blank and doesn't show the startup message I programmed.

I'm going to guess, since you couldn't be bothered to say, that you have a tiny coin cell battery providing power. Of course that is not going to work.

Why is that that code never actually prints any data from the lidar to the LCD?