In the middle of a complicated project I started having problems with garbled LCD characters. I updated the library (the one I had was 10 years old) and started reducing the code thinking something else was causing the problem... until I was with almost no code
Than I uninstalled and reinstalled the compiler and still ... no change.
Indeed I didn't usually use lcd.println() but since a week ago I thought I could save one lcd.setCursor() line of code. Bad idea. But I used it for some days without problems, well, it was eventually outside the 20 characters line limit, appearing in the next line but was being overwritten by the line text that follows.
I can't find out why this code writes TEST immediately followed by two garbled characters. Is lcd.println() trying to print the terminator?
If I use lcd.print() it is OK.
#include <Wire.h>
#include "LiquidCrystal_I2C.h"
LiquidCrystal_I2C lcd(0x3F,20,4);
void setup() {
 lcd.init();
 lcd.backlight();
}
void loop() {
  lcd.clear();
  lcd.println("TEST"); // **NOTE** if I replace lcd.println() by lcd.print() there is no problem
  while(true){} // stay forever
}
Thank you
Martins