LCD not displaying data

The first thing to try is the i2c scanner sketch from the examples menu in the IDE. Until you know that the display is visible on the i2c bus, there is no point trying any other code.