LCD display show weird character while using Serial port as input

Please edit your post to remove the screenshot of the code, and post the code as text, using code tags. See the "How to get the best out of the forum" post for instructions.

You are most likely sending nonstandard/unsupported characters to the LCD. Try turning off "line endings" in the serial monitor.

Avoid using Strings with Arduino, as they cause memory problems and program crashes.

1 Like

I have moved your topic to an appropriate forum category @YanMyoMaw.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an essential part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

This.

Neither the LiquidCrystal library nor the LCD hardware understand line ending characters. i.e. newline/LineFeed and carriage return>
Newline/LineFeed is character code 0xa and Carriage return is character code 0xd
The character code values 0x0 to 0x7 are for displaying 8 special custom user definable characters. (they are garbage by default at powerup)
Note that character values 0x8 to 0xf are a repeat of the custom character code points 0x0 to 0x7
So if you send a newline (character code 0xa) the library will pass the 0xa directly to the LCD chip and the LCD will print custom character 0x2
Likewise if you send CarriageReturn (character code 0xd) the library will pass the 0xd directly to the LCD chip and the LCD will print custom character 0x5

If you print a custom character before you have configured it, the character printed will be garbage since there are no default glyphs for the custom characters.

--- bill

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.