Why my LCD displays wrong characters?

I am a complete beginner of Arduino, and I want to do some artworks with arduino. I have problem with the display of the LCD. The LCD I am using is 1602A and with i2c. I am using the sketch examples comes in with the IDE, and I have attached what it is displaying.... :frowning: anyone can help :frowning:

@donycheng's image:

Which sketch in particular ?

Which Library ?

The example sketches use the LiquidCrystal library, which uses a non-standard legacy bus from the days of the Motorolla 6800, not i2c. You need to replace the library and library code in the examples with an i2c library.

Perehama:
which uses a non-standard legacy bus

You're not from round here, are you?

TheMemberFormerlyKnownAsAWOL:
You're not from round here, are you?

Nearly spoiled the coffee over my keyboard :grinning:

For an I2C LCD display to work, the I2C address and the I2C backpack to LCD pin mapping must be correct. If the library default settings for either or both are not correct the LCD will not work. You can try to figure out the right pin mapping and use an I2C scanner to find the address, but if you install and use the hd44780 library that is done automatically by the library.

Install the hd44780 library. The hd44780 library is the best available for I2C LCDs. The library is available in the Library Manager. Go to Library Manager (in the IDE menus, Sketch, Include Libraries, Manage Libraries) and in the Topics dropdown choose Display and in the Filter your search box enter hd44780. Select and install the hd44780 library by Bill Perry.

The class that you want to use is the hd44780_I2Cexp class. There are examples to show how to use the library. The nice thing about the hd44780 library is that it will autodetect the I2C address and the I2C backpack to LCD pin mapping.

In the examples, there is a diagnostic sketch that will help us to help you if you still have trouble with the display. Run the diagnostic sketch and post the results.

groundFungus:
For an I2C LCD display to work, the I2C address and the I2C backpack to LCD pin mapping must be correct. If the library default settings for either or both are not correct the LCD will not work. You can try to figure out the right pin mapping and use an I2C scanner to find the address, but if you install and use the hd44780 library that is done automatically by the library.

Install the hd44780 library. The hd44780 library is the best available for I2C LCDs. The library is available in the Library Manager. Go to Library Manager (in the IDE menus, Sketch, Include Libraries, Manage Libraries) and in the Topics dropdown choose Display and in the Filter your search box enter hd44780. Select and install the hd44780 library by Bill Perry.

The class that you want to use is the hd44780_I2Cexp class. There are examples to show how to use the library. The nice thing about the hd44780 library is that it will autodetect the I2C address and the I2C backpack to LCD pin mapping.

In the examples, there is a diagnostic sketch that will help us to help you if you still have trouble with the display. Run the diagnostic sketch and post the results.

Worked with the hd44780_I2Cexp!!!!!!!! Thanks!!!!! I attached a photo!!