Having built this project and loaded the Arduino sketch I was frustrated to see the LCD display just the first character of each line. I’d already changed the I2C address to 0x27 for my display so that wasn’t the problem. The serial monitor displayed complete information so the contents of LCDLine 1 and LCDLine 2 were correct and the hardware (apart from the display) was working perfectly. Loading an I2C diagnostic sketch into the Nano proved the display was also OK.
The problem seems to be with the LiquidCrystal_I2C library. I edited the sketch to use the hd44780 and hd44780ioClass/hd44780_I2Cexp libraries developed by Bill Perry (“bperrybap”) which will automatically configure the display driver. I’m no coder but by changing the relevant library references and copying in the LCD geometry lines and “int status” block of code from one of the library’s examples I was able to compile & upload the code and had a fully working display
Incidentally, Bill Perry also provided the I2C diagnostic sketch I used. I wish people would use his library as from what I’ve seen in forum posts the LiquidCrystal_I2C library has a poor reputation.
I hope this helps anyone else who has had the same issue, but out of curiosity can anyone explain what caused the initial problem?
The problem seems to be with the LiquidCrystal_I2C library. I edited the sketch to use the hd44780 and hd44780ioClass/hd44780_I2Cexp libraries developed by Bill Perry (“bperrybap”) which will automatically configure the display driver. I’m no coder but by changing the relevant library references and copying in the LCD geometry lines and “int status” block of code from one of the library’s examples I was able to compile & upload the code and had a fully working display
Incidentally, Bill Perry also provided the I2C diagnostic sketch I used. I wish people would use his library as from what I’ve seen in forum posts the LiquidCrystal_I2C library has a poor reputation.
I hope this helps anyone else who has had the same issue, but out of curiosity can anyone explain what caused the initial problem?