LCD Compilation Troubles

I have a complex Arduino project that includes multiple sonar sensors, audio, servo, and lidar. We decided to add a (simple) 2x16 I2C-LCD display and it brought the project to a complete halt!

We have spent the last few days trying to get this 'simple' display component to work. We keep getting compile errors, or we don't get any output on the display (just the back light turning on/off).

We can successfully display on a large panel, but that doesn't fit into out robot. Why is it so hard to display a couple small lines of status on a display that is so cheap and easy to purchase?

The messy, confusing, and frustrating part is finding a library that works with your device. To make things more complicated is that there are multiple libraries that are called LiquidCrystal_I2C and they don't all work the same.
I'd recommending using libraries from the IDE library manager if you can.
There is a LiquidCrystal_I2C there, however, it may or may not work with your device as not all LCD backpacks are wired up the same way.

My recommendation is to use my hd44780 library. The hd44780_I2Cexp i/o class should work out of the box with that display as it can auto detect the i2c address ad the wiring used on the backpack.
It is available for installation through the IDE library manager.
There is lots of documentation included with the library and on the github page: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library

The first thing to run is the included diagnostic sketch, I2CexpDiag.

Another useful feature of the hd44780 library is you can swap out the display with another and it should "just work" without having to recompile the code even if the i2c address and/or pin mapping on the backpack changes.

--- bill