Problem writing to LCD display, Possibly code structure?

Hello,

For some background info: I am currently building a project that remotely monitors the level in a sump pump pit and sends the data to Adafruit.io to be viewed remotely. An ultrasonic sensor reads the waterlevel and controls a relay to turn on and off the sump pump. there are 3 leds for alarm and pump status. There is an LCD display for local waterlevel and alarm readings. The lcd display is wired in correctly becuase the hello world sketch works perfectly. I can print to the LCD screen in the first few lines of my setup but then i am unable to update/print to the LCD screen anywhere in my main loop, it provides those little squiggly marks like in the picture. Is there anywhere in my code that i can write to the LCD and update the water level. every other aspect of my code works im just trying to print to the readings the LCD screen.

Thanks,
Scott

PICTURE ---> https://photos.app.goo.gl/9ZTjGkoWSUo96g5G6

#include <SPI.h>
#include "Adafruit_MQTT.h"                                                               //Adafruit MQTT library for publishing and subscribing
#include "Adafruit_MQTT_Client.h"                                                        //Adafruit MQTT library for connection
#include <Ethernet.h>                                                                    //Ethernet library for ethernet board
#include <EthernetClient.h>                                                              //ethernet client library for connection via ethernet
#include <Dns.h>                                                                         //For connection to server with ethernet
#include <Dhcp.h>                                                                        //for assigning an automatic IP
 #include <Ultrasonic.h>                                                                       
#include <LiquidCrystal.h>                                                               //LCD library for local data readings
                                                                       
unsigned long previousMillis = 0;                                                        
const long refreshrate = 10000;                                                          //Used to change how fast the data is send to adafruit.io, they throttle the amount of data DO NOT use under 1000 or 1s
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};                                       //Assign a MAC Adress to the ethernet shield/arduino
                              //Set variables for each of the different pins

#define AIO_SERVER      "io.adafruit.com"                                                //Adafruit Website
#define AIO_SERVERPORT  1883                                                             //Port for connecting to server, do not change
#define AIO_USERNAME    "smagnusson"                                                     //Your Adafruit IO Username
#define AIO_KEY         "8db5fb778ad941f1981380bea14f3d5f"                               //Your special AIO Key to send and recieve data from your feeds
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

Ultrasonic ultrasonic(9,8); // (Trig PIN,Echo PIN)
float WATERLEVEL = 0;
int ALARMSP1 = 15; 
int DEADBAND = 5;
int ALARM1 = 0;
int X = 0;
int PUMPSTATE = 0;
int val = 0;
int Y = 0;                                                               
int pitdepth = 30;


EthernetClient client;                                                                  //Set up the ethernet client
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);  //MQTT client setup


#define halt(s) { Serial.println(F( s )); while(1);  }


                                                                                                                  //Setup different feeds for publishing
Adafruit_MQTT_Publish RealTimeLevel = Adafruit_MQTT_Publish(&mqtt,  AIO_USERNAME "/feeds/RealTimeLevel");             //waterlevel

Adafruit_MQTT_Subscribe TripLevel = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/TripLevel");            //pump turn on point




void setup() {
  Serial.begin(9600);                                                                                   //Set the baud rate
  lcd.begin(16, 2); 



  Serial.print(F("\nInit the Client..."));                                                              // Initialise the Client
  Ethernet.begin(mac);
  delay(1000);                                                                                          //give the ethernet a second to initialize
  mqtt.subscribe(&TripLevel);                                                                          //Subscription feeds need to be in the setup
pinMode(A0, OUTPUT);  //green LED
pinMode(A1, OUTPUT);  //red LED
pinMode(A2, OUTPUT); //RELAY
pinMode(A4, OUTPUT);   // YELLOW LD

   digitalWrite(A1,LOW);
      digitalWrite(A4, HIGH);
   digitalWrite(A0,LOW); 
   digitalWrite(A2,HIGH);
  

}

uint32_t x=0;

void loop() {
  MQTT_connect();                                                                                       // Ensure the connection to the MQTT server is alive (this will make the first
                                                                             // connection and automatically reconnect when disconnected)See the MQTT_connect at bottom                                      
  unsigned long currentMillis = millis();                                                               //used to execute the main program loop, millis() is milliseconds from arduino startup
uint16_t triplvl = atoi((char *)TripLevel.lastread);
WATERLEVEL = (pitdepth - ultrasonic.Ranging(CM));                          
                       
  Adafruit_MQTT_Subscribe *subscription;                                                                //Setup subscription to read the subscription que

  while ((subscription = mqtt.readSubscription(2000))) {                                                //Read the subscription que every 2 seconds, if theres a new value, print to LCD Screen for debugging
    if (subscription == &TripLevel) {
      Serial.print(F("New Trip Level: "));                                                             //Print new SP to serial monitor
      Serial.println((char *)TripLevel.lastread);   
lcd.setCursor(0, 0); 
  lcd.print("WaterLevel");





 
    }
  }
 if ((currentMillis - previousMillis) >= refreshrate) {                                                 //loop runs to whatever the refresh rate is set to. 
  previousMillis = currentMillis;


  RealTimeLevel.publish(WATERLEVEL);                                                                      // save wwaterlevel to Adafruit feed

 }
 
  if ((WATERLEVEL > triplvl) && (Y == 0))    {                                         //if Waterlevel is above trip point, turn on pump
   digitalWrite(A4, HIGH);
   digitalWrite(A0,LOW); 
   digitalWrite(A2,LOW);
   ALARM1 = 0;
   PUMPSTATE = 1;
   X++;
   Serial.println(X);


  }
 if (WATERLEVEL <= (triplvl - DEADBAND))   {                           // If water level is below the trip point and deadband, pump off
     digitalWrite(A0, HIGH);
   digitalWrite(A4,LOW);
   digitalWrite(A2,HIGH);
   digitalWrite(A1,LOW);
   PUMPSTATE = 0;
   ALARM1 = 0;
   X = 0;
   Y = 0;
   Serial.println("pump off");
          
          

     }
 if (X == 60) {                                                         //If pump has been on for 500 loops, Signal Pump Failure
  ALARM1 = 1;
     digitalWrite(A1,HIGH);
   digitalWrite(A0,LOW); 
   digitalWrite(A2,HIGH);
   digitalWrite(A4,LOW);
   Y = 1;
   
 }

   
 
}


void MQTT_connect() {                                                                                  // Function to connect and reconnect as necessary to the MQTT server.
  int8_t ret;                                                                                          // Should be called in the loop function and it will take care if connecting.

  if (mqtt.connected()) {                                                                              // Stop if already connected.
    return;
  }

  Serial.print("Connecting to MQTT... ");

  while ((ret = mqtt.connect()) != 0) { // connect will return 0 for connected
       Serial.println(mqtt.connectErrorString(ret));
       Serial.println("Retrying MQTT connection in 5 seconds...");
       mqtt.disconnect();
       delay(5000);                                                                                    // delay 5 seconds before trying to reconnect so we dont send too many requests
  }
  Serial.println("MQTT Connected!");
}

I suspect you have a pin conflict with the Ethernet library. You're using pins 11 and 12 for your LCD. If you're using an Uno, see this from the reference:

The Arduino board communicates with the shield using the SPI bus. This is on digital pins 11, 12, and 13 on the Uno