Trouble with I2C and Hydrometers

Hi there
I have been racking my brains over this. I have three hydrometers set with a threshold and 20x4 LCD display. All running on an UNO. Display works fine with all other code and sensors that I have tested.

Hydrometer 1= A0
Hydrometer 2= A1
Hydrometer 3= A2
LCD SCL = A5
LCD SDA = A4

However, with the code I am using, I get these two annoying blotch squares on the top two lines of my screen:

LCD Blotch by james_caldwell1973, on Flickr

If I run only one or two hydrometers the annoying squares go to the bottom of the screen.
I have run an I2C address scanner.

Here is my code:

#include <LiquidCrystal_I2C.h>
#include <math.h>
#include <Wire.h>

int plantPin1 = A0;
int plantPin2 = A1;
int plantPin3 = A2;
int thresholdValue = 800;// you can adjust the threshold value
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address

void setup(){
  pinMode(plantPin1, INPUT);
  pinMode(plantPin2, INPUT);
  pinMode(plantPin3, INPUT);
  lcd.begin(20,4);   // initialize the lcd for 20 chars 4 lines, turn on backlight
}

void loop() {
  lcd.setCursor(0,0); //Start at character 0 on line 1
  lcd.print("Moisture Levels");
  
  // read the input on analog pins:
  int sensorValue1 = analogRead(plantPin1);
  int sensorValue2 = analogRead(plantPin2);
  int sensorValue3 = analogRead(plantPin3);
  
  if(sensorValue1 < thresholdValue){
    lcd.setCursor(0,1); //Start at character 0 on line 2
    lcd.print ("Plant 1:");
    lcd.println("OK          ");
  }
  else {
    lcd.setCursor(0,1); //Start at character 0 on line 2
    lcd.print ("Plant 1:");
    lcd.println("Needs Water!");
  }


   if(sensorValue2 < thresholdValue){
    lcd.setCursor(0,2); //Start at character 0 on line 3
    lcd.print ("Plant 2:");
    lcd.println("OK          ");
  }
  else {
    lcd.setCursor(0,2); //Start at character 0 on line 3
    lcd.print ("Plant 2:");
    lcd.println("Needs Water!");
  }


    if(sensorValue3 < thresholdValue){
    lcd.setCursor(0,3); //Start at character 0 on line 4
    lcd.print ("Plant 3:");
    lcd.println("OK          ");
  }
  else {
    lcd.setCursor(0,3); //Start at character 0 on line 4
    lcd.print ("Plant 3:");
    lcd.println("Needs Water!");
  }
  delay(5000);
}

Any assistance would be much appreciated…Thank you

Try different library - https://github.com/enjoyneering/LiquidCrystal_I2C

@jckorea4994

Another library won't help and may cause new problems, so stick with what you have.

Using println adds carriage return and line feed control characters to the end of a string and these print as the annoying squares. As you are printing 20 characters to fill the line these spill onto the next line and then wrap back to the top of the display. You don't need these anyway as you move the cursor.

Change lcd.println(...) to lcd.print(...) everywhere.

Thank you a thousand times over!

How did I miss all those println in my code!!!!

So used to seeing it in the serial I guess. So happy I could cry! :)