Yet another LCD I2C library


#1

https://xod.io/libs/gweimer/lcd-i2c-init/

Trying to use existing LCD library to update different LCD lines from different nodes was not working because each call to LCD would initialize & clear the display, losing the lines I was not updating. This was my solution to the problem.

lcd->begin is only called if Init pin is true. lcd->begin must be called at least once to initialize the display before it will display anything.

I also added truncating of strings > COLS long, and I do NOT clear lines if input for the line is the null string.

While I was at it, I added COLS & ROWS pins so it could be used with multiple displays. Input pins for any lines > ROWS will be ignored. I limited input to 4 lines to handle many displays without adding too many pins to the node. If node scaling is ever implemented to allow variable number of pins, this code should be close to ready for using it.