lcd.clear is'nt working well

Try using a different pin for the LCD 'RS' connection as pin 1 is used by the serial port.

Don