Adding LCD to MPU 9250 halts program

Hi, My project is to take a mpu 9250 sensor and read the yaw and compass heading and present it on a 16x2 LCD using the I2C buss.
Basic code works when looking at the serial display tool but when I add the LCD to the board the display tool stops.

The 9250 board has a 5 v regulator so thats what I am using.

The code below is sample code I downloaded where I added just enough code to get the LCD to work.

LCD SCL and SDA connected and nothing work. Remove SCL and SDA from the LCD and the sample code works.

//dg 7-16/16 Reads all strings, Raw data
#include <Wire.h>
#include <TimerOne.h>
#include <LiquidCrystal_I2C.h>


#define    MPU9250_ADDRESS            0x68
#define    MAG_ADDRESS                0x0C
#define    LCD_ADDRESS                0x3F
#define    GYRO_FULL_SCALE_250_DPS    0x00  
#define    GYRO_FULL_SCALE_500_DPS    0x08
#define    GYRO_FULL_SCALE_1000_DPS   0x10
#define    GYRO_FULL_SCALE_2000_DPS   0x18
#define WHO_AM_I_MPU9250 0x75 // Should return 0x71
#define    ACC_FULL_SCALE_2_G        0x00  
#define    ACC_FULL_SCALE_4_G        0x08
#define    ACC_FULL_SCALE_8_G        0x10
#define    ACC_FULL_SCALE_16_G       0x18

LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address

// This function read Nbytes bytes from I2C device at address Address. 
// Put read bytes starting at register Register in the Data array. 
void I2Cread(uint8_t Address, uint8_t Register, uint8_t Nbytes, uint8_t* Data)
  // Set register address
  // Read Nbytes
  Wire.requestFrom(Address, Nbytes); 
  uint8_t index=0;
  while (Wire.available())

// Write a byte (Data) in device (Address) at register (Register)
void I2CwriteByte(uint8_t Address, uint8_t Register, uint8_t Data)
  // Set register address

// Initial time
long int ti;
volatile bool intFlag=false;

// Initializations
void setup()
  // Arduino initializations
//LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address

lcd.begin(16,2);   // initialize the lcd for 16 chars 2 lines, turn on backlight
// ------- Quick 3 blinks of backlight  -------------
  for(int i = 0; i< 3; i++)
  lcd.backlight(); // finish with backlight on  

 // Read the WHO_AM_I register, this is a good test of communication
//  Serial.println("MPU9250 9-axis motion sensor...");
//  byte c = readByte(MPU9250_ADDRESS, WHO_AM_I_MPU9250);  // Read WHO_AM_I register for MPU-9250
//  Serial.print("MPU9250 "); Serial.print("I AM "); Serial.print(c, HEX); Serial.print(" I should be "); Serial.println(0x71, HEX);

  // Set accelerometers low pass filter at 5Hz
  // Set gyroscope low pass filter at 5Hz
  // Configure gyroscope range
  // Configure accelerometers range
  // Set by pass mode for the magnetometers
  // Request continuous magnetometer measurements in 16 bits
   pinMode(13, OUTPUT);
  Timer1.initialize(10000);         // initialize timer1, and set a 1/2 second period
  Timer1.attachInterrupt(callback);  // attaches callback() as a timer overflow interrupt
  // Store initial time

// Counter
long int cpt=0;

void callback()
  digitalWrite(13, digitalRead(13) ^ 1);

// Main loop, read and display data
void loop()
  while (!intFlag);
  // Display time
  Serial.print (millis()-ti,DEC);
  Serial.print ("\t");

  // _______________
  // ::: Counter :::
  // Display data counter
//  Serial.print (cpt++,DEC);
//  Serial.print ("\t");
  // ____________________________________
  // :::  accelerometer and gyroscope ::: 

  // Read accelerometer and gyroscope
  uint8_t Buf[14];
  // Create 16 bits values from 8 bits data
  // Accelerometer
  int16_t ax=-(Buf[0]<<8 | Buf[1]);
  int16_t ay=-(Buf[2]<<8 | Buf[3]);
  int16_t az=Buf[4]<<8 | Buf[5];

  // Gyroscope
  int16_t gx=-(Buf[8]<<8 | Buf[9]);
  int16_t gy=-(Buf[10]<<8 | Buf[11]);
  int16_t gz=Buf[12]<<8 | Buf[13];
    // Display values
  // Accelerometer
  Serial.print (ax,DEC); 
  Serial.print ("\t");
  Serial.print (ay,DEC);
  Serial.print ("\t");
  Serial.print (az,DEC);  
  Serial.print ("\t");
  // Gyroscope
  Serial.print (gx,DEC); 
  Serial.print ("\t");
  Serial.print (gy,DEC);
  Serial.print ("\t");
  Serial.print (gz,DEC);  
  Serial.print ("\t");

  // _____________________
  // :::  Magnetometer ::: 

  // Read register Status 1 and wait for the DRDY: Data Ready
  uint8_t ST1;
  while (!(ST1&0x01));

  // Read magnetometer data  
  uint8_t Mag[7];  

  // Create 16 bits values from 8 bits data
  // Magnetometer
  int16_t mx=-(Mag[3]<<8 | Mag[2]);
  int16_t my=-(Mag[1]<<8 | Mag[0]);
  int16_t mz=-(Mag[5]<<8 | Mag[4]);
  // Magnetometer
  Serial.print (mx+200,DEC); 
  Serial.print ("\t");
  my = atan2((double)my, (double)mx) * 180.0/3.14159265 + 180;
    while (my < 0) my += 360;
    while (my > 360) my -= 360;
//    Serial.print(heading);
//   Serial.println(" degrees");

  Serial.print (my,DEC);
  Serial.print ("\t");
  Serial.print (mz-700,DEC);  
  Serial.print ("\t");
  // End of line
//  delay(5000);    

Connect the LCD and run a "I2C scanner" sketch (search on Google!) to see if you are using the correct I2C address for the LCD. Then get the LCD on its own running using example code from the library, then add the gyro.

Thanks, I had made the mistake of assuming that since the display had worked before it would continue. My error. The display had gone bad. The I2C scanner showed nothing. New display, and functions as expected.
Many Thanks,