Problems implenting code on 20x4 LCD but code works on 16x2

Right it will clear the LCD every time the main loop is run, something that isn't necessary unless the output has changed.

You really should avoid using lcd.clear() even if the output has changed. You are usually better off just overwriting the old information with the new.

Don